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

New Post: Problem with Propertygrid and fonts

$
0
0
Hi,

Concerning the ToString() value that doesn't change when the properties are changed : Please have a look at this discussion : http://wpftoolkit.codeplex.com/discussions/452722.

You could do something like that :
<xctk:PropertyGrid x:Name="_propertyGrid">
            <xctk:PropertyGrid.EditorDefinitions>
                <xctk:EditorTemplateDefinition TargetProperties="EditorFont">
                <xctk:EditorTemplateDefinition.EditingTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <!-- When using SelectedObject[s], the DataContext will be the PropertyItem. Bind to the "Value" property. -->
                            <TextBlock Text="{Binding Value.Family}" />
                            <TextBlock Text=", " />
                            <TextBlock Text="{Binding Value.FontSize}" />
                            <TextBlock Text=", " />
                            <TextBlock Text="{Binding Value.Weight}" />
                            <TextBlock Text=", " />
                            <TextBlock Text="{Binding Value.Style}" />
                            <TextBlock Text=", " />
                            <TextBlock Text="{Binding Value.Stretch}" />
                        </StackPanel>
                    </DataTemplate>
                </xctk:EditorTemplateDefinition.EditingTemplate>
            </xctk:EditorTemplateDefinition>
            </xctk:PropertyGrid.EditorDefinitions>
        </xctk:PropertyGrid>

Viewing all articles
Browse latest Browse all 4964

Latest Images

Trending Articles



Latest Images

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