Harold
Harold
Background="Red"
to this expander : <Expander Header="{Binding Name}"
Style="{StaticResource ExpanderStyle}">
and recompile the Toolkit.Okay, it's available. It will be on Nuget on monday.Forgive my being pushy, but...
Kosmatos wrote:Ok; you got me!Okay, it's available. It will be on Nuget on monday.Forgive my being pushy, but...I have a project that is waiting to be pushed into UAT, but it is dependent on the bug mentioned above being fixed. If for some reason the fix is not in the 2.1 release I will download the source instead and build for myself but I would prefer not to have to do that as NuGet is so much more convenient - especially if the update is pending!
- Can you confirm that the bug (report/work item) affecting use of the CheckComboBox within a DataTemplate is resolved in community version 2.1?
- Approximately what time (locally to you) do you plan to release community version 2.1 on NuGet (assuming that you still plan to make this available today as stated above)?
Thanks.
class Model {
private String surcharges = "PW";
public String Surcharges {
get { return this.surcharges; }
set { this.surcharges = value; }
}
public List<Option> SurchargeOptions { get; set; }
}
class Option {
public String Code { get; set; }
public String Description { get; set; }
}
And the corresponding XAML looks like this...<GridViewColumn Header="Surcharges">
<GridViewColumn.CellTemplate>
<DataTemplate>
<et:CheckComboBox Delimiter=" " DisplayMemberPath="Code" ItemsSource="{Binding Path=SurchargeOptions}" MinWidth="150" SelectedValue="{Binding Path=Surcharges}" ValueMemberPath="Code" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
The SurchargeOptions property is set to a list of Option types prior to display, the list contains about 10 items including the "PW" option. The field on screen however does not display any content when not dropped down (I am expecting it to show "PW") and when dropped down the options are all present but none (including the "PW" are selected).public class Model {
public String Surcharges {
get { return (this.surcharges ?? String.Empty).Replace(@" ", @","); }
set { this.surcharges = (value ?? String.Empty).Replace(@",", @" "); }
}
}
<et:CheckComboBox Delimiter=","
DisplayMemberPath="PalletNetworkSurchargeCode"
ItemsSource="{Binding Path=SurchargeOptions}"
MinWidth="150"
SelectedValue="{Binding Path=Surcharges}"
ValueMemberPath="PalletNetworkSurchargeCode" />
Not working (similar updates to the above)...public class Model {
public String Surcharges {
get { return (this.surcharges ?? String.Empty).Replace(@" ", @"/"); }
set { this.surcharges = (value ?? String.Empty).Replace(@"/", @" "); }
}
}
<et:CheckComboBox Delimiter="/"
DisplayMemberPath="PalletNetworkSurchargeCode"
ItemsSource="{Binding Path=SurchargeOptions}"
MinWidth="150"
SelectedValue="{Binding Path=Surcharges}"
ValueMemberPath="PalletNetworkSurchargeCode" />
This issue will be fixed in v2.3.
In the meantime, you do the following modification in file :
Xceed.Wpf.Toolkit/Core/Primitives/Selector.cs
In method :
OnDelimiterChanged
Replace :
```
( ( Selector )o ).UpdateSelectedValue();
```
with :
```
Selector selector = (Selector)o;
if( selector.IsInitialized )
{
selector.UpdateSelectedValue();
}
```
jaredthirsk has uploaded a patch.
Description:
Allow the user to determine their own logic for determining whether a PropertyGrid property should be expandable.
e.g.
private static bool IsExpandablePredicate(object item)
{
PropertyDescriptor property = item as PropertyDescriptor;
var tca = property.PropertyType.GetCustomAttribute<TypeConverterAttribute>();
if (tca != null)
{
return tca.ConverterTypeName == typeof(ExpandableObjectConverter).AssemblyQualifiedName;
}
return false;
}
void InitCode()
{
Xceed.Wpf.Toolkit.PropertyGrid.PropertyGrid.IsExpandablePredicate = IsExpandablePredicate;
}
I agree! Down with view-DLL attributes being required in model code!!!!
Here's a patch. It's quick and hacky, but I don't care...