Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all 4964 articles
Browse latest View live

New Post: License question

$
0
0
Hello,

I'm not sure if I understood correctly MS-pl license. So my question is, can I use Wpftoolkit Community Edition library in a commercial/proprietary product?

Cheers,
jkovalsky

New Post: How to disable auto-validation in DateTimePicker.

$
0
0
Hi,

Can you upgrade to a newer version of the toolkit ? Currently, the latest version is 2.1, and the "Plus" version is at 2.2.

Commented Unassigned: In color picker, when selected, Chocolate displays "Ccolate" [20881]

$
0
0
![Image](http://i.imgur.com/dnWIwWM.png)

Update: I've noticed a number of these abbreviations. Is there a reason for all of the abbreviated names?
Comments: ** Comment from web user: BoucherS **

This configuration looks good. If you try the "LiveExplorer App", available on this page "https://wpftoolkit.codeplex.com/", in the "InputFields/Color" section of the LiveExplorer, do you have the same problem ? When I try it, I don't see any abbreviations.

Commented Unassigned: In color picker, when selected, Chocolate displays "Ccolate" [20881]

$
0
0
![Image](http://i.imgur.com/dnWIwWM.png)

Update: I've noticed a number of these abbreviations. Is there a reason for all of the abbreviated names?
Comments: ** Comment from web user: benjin **

Yeah, that one looks fine to me. I tried messing with the width (I had it manually set to 180px before) to see whether that changed anything, but both auto and 220px wide yielded the same results.

I just remembered that I pulled the package from Nuget, so I'll try downloading it directly from codeplex and including that one.

Commented Unassigned: CheckComboBox DisplayMemebrPath problem [20919]

$
0
0
When selecting an item, the combobox shows exactly the right string. But while the droppbox is open, the named displayed in the droppbox are all set to the name of the entity in ItemSource.
This is my xaml:
```
<xctk:CheckComboBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,2,5,2" VerticalAlignment="Stretch" ItemsSource="{Binding Genders}" SelectedItemsOverride="{Binding SelectedGenders}" DisplayMemberPath="Title"/>
```
Also when I use below ItemTemplate droppbox shows right string and combobox shows selected entity names!
```
<DataTemplate x:Key="DisplayTemplate" DataType="{x:Type model:CMN_KeyValue}">
<TextBlock Text="{Binding Title}"/>
</DataTemplate>

<xctk:CheckComboBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,2,5,2" VerticalAlignment="Stretch" ItemsSource="{Binding Genders}" SelectedItemsOverride="{Binding SelectedGenders}" ItemTemplate="{StaticResource DisplayTemplate}"/>
```
I use 2.1 version
Comments: ** Comment from web user: BoucherS **

Hi,

The CheckComboBox is an ItemsControl. The ItemsControl class contains the property "ItemTemplate", which is : "Gets or sets the DataTemplate used to display each item.".
ref : http://msdn.microsoft.com/query/dev11.query?appId=Dev11IDEF1&l=EN-US&k=k(System.Windows.Controls.ItemsControl.ItemTemplate);k(ItemTemplate);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5);k(DevLang-csharp)&rd=true

So the ItemTemplate will set how each items in the dropbox is shown.

The ItemsControl class also contains the property "DisplayMemberPath", which is "Gets or sets a path to a value on the source object to serve as the visual representation of the object.".
ref : http://msdn.microsoft.com/en-us/library/vstudio/system.windows.controls.itemscontrol.displaymemberpath(v=vs.100).aspx

So the DisplayMemberPath will be used to get the property named "Value of DisplayMemberPath " on the object and display its content : in the dropbox and in the comboBox.

The CheckComboBox has a "Text" property, which is a string of all the selected objects, and this string is the one displayed in the comboBox. When the selection changes, in CheckComboBox.GetItemDisplayValue( object item ), if "DisplayMemberPath" is not null, the "Value of DisplayMemberPath" is obtained on each selectedObject to build the CheckComboBox.Text property. That is why the comboBox has the correct text when "DisplayMemberPath" is used.

Bu if the property CheckComboBox.ItemTemplate is used, we have no ways of knowing what property is used to display the objects. That is why the object name is returned as the content of the CheckComboBox.Text property.

New Post: License question

Edited Issue: PropertyGrid native array support crashes (NullReferenceException) [20885]

$
0
0
PropertyGrid has no correct handling code for arrays (only Lists); inserting an object with an embedded c# array causes a crash after editing the collection (when an element is added, for instance).

To reproduce:
class TestSubclass
{
public string m_test1;
public string Test1
{
get { return m_test1; }
set { m_test1 = value; }
}
public string m_test2;
public string Test2
{
get { return m_test2; }
set { m_test2 = value; }
}
}

class TestObject
{
TestSubclass[] m_array;
public TestSubclass[] Array
{
get { return m_array; }
set { m_array = value; }
}
}

public MainWindow()
{
InitializeComponent();
propGrid.SelectedObject = new TestObject();
}
Comments: ** Comment from web user: BoucherS **

Hi,

In v2.3, there won't be any crashes related to arrays in CollectionControl (or PropertyGrid using CollectionControls).

New Post: How to disable auto-validation in DateTimePicker.

$
0
0
Thanks, I appreciate your reply.

I pulled down the latest code base (2.1.0.0), added the code snippet you suggested and tried that, but it still seems to be acting weird.

It still seems to be doing the same thing. Once losing focus, instead of resetting to the original date (from the invalid date) it resets to the first digit of the invalid date. For example, setting the day with the cursor and keyboard to 78 and after losing focus, the date changes to 07. I would expect it to behave like the .NET DatePicker, and I think you said that is to be implemented in a future release.

New Post: IntegerUpDown In DataGrid.CellEditTemplate Can not selectAll

$
0
0
<DataGridTemplateColumn.CellEditingTemplate>
                        <DataTemplate>
                            <Grid Background="AliceBlue" FocusManager.FocusedElement="{Binding ElementName=intUpDown}">
                                <xwt:IntegerUpDown Value="{Binding Age}" Name="intUpDown" SelectAllOnGotFocus="True" GotFocus="intUpDown_GotFocus">
                                </xwt:IntegerUpDown>
                            </Grid>
                        </DataTemplate>
 </DataGridTemplateColumn.CellEditingTemplate>
Hi:
I tried set 'SelectAllOnGotFocus' true and 'AutoSelectBehavior' OnFocus, but it doesn't work.
Is there any method which I can use to select all programmatically?
Do you have any idea?
Thanks in advance.

New Post: MessageBox Image

$
0
0
Hi BoucherS,

First of all, thanks for the service you provide in developing this free tool.

To add to the question that AeroClassics asked, is there any way that these images can be set in a style, so that we set the default icons for the messagebox for the whole application (exclamation, warning, info, error..) instead of one at a time when we instantiate the messagebox? As it stands now, I think I have to know what kind of icon I need and set the source of that icon every time I use the messagebox.

Thank you.

New Post: Custom PropertyDescriptor not getting updated in Property Grid and nullables don't all show up?

$
0
0
Any information I can get on this? I've tried quite a few different ways with ICustomTypeDescriptors and PropertyDescriptors and none of them work with the propertygrid. Am I missing something or is it only a Paid feature?

Created Unassigned: How to disable auto-validation in DateTimePicker. [20926]

$
0
0
Based on discussion https://wpftoolkit.codeplex.com/discussions/541408.

New Post: How to disable auto-validation in DateTimePicker.

$
0
0
Hi,

I'm trying the DatetimePicker in v2.1. If I modify the minutes from "12" to "78" and put focus on another control, the date is changed to January 1 0001 with the time 00:00:00. With the code snippet added to DateTimeUpDown.TryParseDateTime(), I get the behavior you say : "78" become "07" instead of reverting to last valid time.

This is because when you type the "7" of "78", the current time is "07" and registered as the last valid time. So entering the "8" of "78" will revert to "07".

Issue https://wpftoolkit.codeplex.com/workitem/20926 has been created.

Edited Issue: How to disable auto-validation in DateTimePicker. [20926]

$
0
0
Based on discussion https://wpftoolkit.codeplex.com/discussions/541408.
Comments: ** Comment from web user: BoucherS **

This issue will be fixed in v2.4.

New Post: IntegerUpDown In DataGrid.CellEditTemplate Can not selectAll

$
0
0
Hi,

"SelectAllOnGotFocus'" is obsolete, you can forget it and only set "AutoSelectBehavior" to "OnFocus".

If used as an independent control, the IntegerUpDown.AutoSelectBehavior will work.

To use it in a DataGridTemplateColumn.CellEditingTemplate, try using a trigger :
<DataTemplate x:Key="MyDataTemplate">
         <Grid Background="AliceBlue">
            <xctk:IntegerUpDown Value="{Binding Age}"
                               Name="intUpDown"
                               AutoSelectBehavior="OnFocus"/>
         </Grid>

         <DataTemplate.Triggers>
            <Trigger SourceName="intUpDown"
                     Property="IsVisible"
                     Value="True">
               <Setter TargetName="intUpDown"
                       Property="FocusManager.FocusedElement"
                       Value="{Binding ElementName=intUpDown}" />
            </Trigger>
         </DataTemplate.Triggers>
      </DataTemplate>

New Post: MessageBox Image

$
0
0
Hi Dawit_A,

Of course you can create a style for MessageBoxes. Here's an example :
<Style x:Key="MessageBoxStyle"
             TargetType="xctk:MessageBox">
         <Setter Property="Background"
                 Value="Green" />
         <Setter Property="ImageSource"
                 Value="Bold16.png" />
 </Style>

 <xctk:WindowContainer>
            <xctk:MessageBox x:Name="_messageBox"
                             Text="This is a MessageBox"
                             Caption="Message Box Title"
                             Style="{StaticResource MessageBoxStyle}"/>
</xctk:WindowContainer>

Commented Unassigned: CheckComboBox DisplayMemebrPath problem [20919]

$
0
0
When selecting an item, the combobox shows exactly the right string. But while the droppbox is open, the named displayed in the droppbox are all set to the name of the entity in ItemSource.
This is my xaml:
```
<xctk:CheckComboBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,2,5,2" VerticalAlignment="Stretch" ItemsSource="{Binding Genders}" SelectedItemsOverride="{Binding SelectedGenders}" DisplayMemberPath="Title"/>
```
Also when I use below ItemTemplate droppbox shows right string and combobox shows selected entity names!
```
<DataTemplate x:Key="DisplayTemplate" DataType="{x:Type model:CMN_KeyValue}">
<TextBlock Text="{Binding Title}"/>
</DataTemplate>

<xctk:CheckComboBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,2,5,2" VerticalAlignment="Stretch" ItemsSource="{Binding Genders}" SelectedItemsOverride="{Binding SelectedGenders}" ItemTemplate="{StaticResource DisplayTemplate}"/>
```
I use 2.1 version
Comments: ** Comment from web user: ShahramShobeiri **

Hi,

> So the DisplayMemberPath will be used to get the property named "Value of DisplayMemberPath " on the object and display its content : in the dropbox and in the comboBox.


In my case __DisplayMemberPath__ does not set correct content for __both__ dropbox and comboBox.The content of combobox(the "Text" property) is correct but the dropdown shows objects names. I used ItemTemplate as an alternative way but as I said it does not work either(reverses the problem between combobox and dropdown).

New Post: Custom PropertyDescriptor not getting updated in Property Grid and nullables don't all show up?

$
0
0
Hi,

You can try the "LiveExplorer App" available on this page : https://wpftoolkit.codeplex.com/ to test the different scenarios and to know what options are available in the "Plus" version and which ones are available in the Regular version.

If you still have a problem, can you provide a complete sample, including the xaml, the propertyGrid, the sources..., so we can try to reproduce the exact same problem ?

Thank you.

Commented Unassigned: CheckComboBox DisplayMemebrPath problem [20919]

$
0
0
When selecting an item, the combobox shows exactly the right string. But while the droppbox is open, the named displayed in the droppbox are all set to the name of the entity in ItemSource.
This is my xaml:
```
<xctk:CheckComboBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,2,5,2" VerticalAlignment="Stretch" ItemsSource="{Binding Genders}" SelectedItemsOverride="{Binding SelectedGenders}" DisplayMemberPath="Title"/>
```
Also when I use below ItemTemplate droppbox shows right string and combobox shows selected entity names!
```
<DataTemplate x:Key="DisplayTemplate" DataType="{x:Type model:CMN_KeyValue}">
<TextBlock Text="{Binding Title}"/>
</DataTemplate>

<xctk:CheckComboBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,2,5,2" VerticalAlignment="Stretch" ItemsSource="{Binding Genders}" SelectedItemsOverride="{Binding SelectedGenders}" ItemTemplate="{StaticResource DisplayTemplate}"/>
```
I use 2.1 version
Comments: ** Comment from web user: BoucherS **

Hi,

Using v2.1 of the Toolkit, I can set the DisplayMemberPath on the CheckComboBox and the ComboBox AND its dropBox displays correctly. Here's my complete sample :
```
<Grid>
<xctk:CheckComboBox x:Name="_checkComboBox"
HorizontalAlignment="Stretch"
Height="22"
VerticalAlignment="Stretch"
ItemsSource="{Binding Genders}"
SelectedItemsOverride="{Binding SelectedGenders}"
DisplayMemberPath="Title"/>
</Grid>

public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();

_checkComboBox.DataContext = this;

this.Genders = new ObservableCollection<Gender>()
{
new Gender() { Title = "Man" },
new Gender() { Title = "Woman" },
};

this.SelectedGenders = new ObservableCollection<Gender>();
}

public ObservableCollection<Gender> Genders
{
get;
set;
}

public ObservableCollection<Gender> SelectedGenders
{
get;
set;
}
}

public class Gender
{
public string Title
{
get;
set;
}
}
```

Commented Unassigned: CheckComboBox DisplayMemebrPath problem [20919]

$
0
0
When selecting an item, the combobox shows exactly the right string. But while the droppbox is open, the named displayed in the droppbox are all set to the name of the entity in ItemSource.
This is my xaml:
```
<xctk:CheckComboBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,2,5,2" VerticalAlignment="Stretch" ItemsSource="{Binding Genders}" SelectedItemsOverride="{Binding SelectedGenders}" DisplayMemberPath="Title"/>
```
Also when I use below ItemTemplate droppbox shows right string and combobox shows selected entity names!
```
<DataTemplate x:Key="DisplayTemplate" DataType="{x:Type model:CMN_KeyValue}">
<TextBlock Text="{Binding Title}"/>
</DataTemplate>

<xctk:CheckComboBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5,2,5,2" VerticalAlignment="Stretch" ItemsSource="{Binding Genders}" SelectedItemsOverride="{Binding SelectedGenders}" ItemTemplate="{StaticResource DisplayTemplate}"/>
```
I use 2.1 version
Comments: ** Comment from web user: ShahramShobeiri **

Thanks for your answer,

I exactly write your code in my project, and it does not worked!
For double check I write your code in a new project and it worked correctly!!!!!!
I think this control has a conflict with some of other libraries in my project. I am using [MahApps](http://mahapps.com/) and maybe it cause the problem.

Viewing all 4964 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>