All the controls missing in WPF. Over 1 million downloads.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
3.0 KiB

<!--*************************************************************************************
Toolkit for WPF
Copyright (C) 2007-2025 Xceed Software Inc.
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
For more features, controls, and fast professional support,
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
*************************************************************************************-->
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.PropertyGrid.Views.PropertyGridSelectedObjectView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:s="clr-namespace:System;assembly=mscorlib"
VerticalScrollBarVisibility="Disabled"
Title="Using SelectedObject(s)">
<local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe">
When setting the SelectedObject property to an instance of an item, you can modify the values of the object properties.
</Paragraph>
</local:DemoView.Description>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Margin="20">
<TextBlock Text="Focus the element to inspect with the PropertyGrid."
TextWrapping="Wrap"/>
</StackPanel>
<!--
PropertyNameBinding will be used to determine the property name display text.
The value displayed will be specified through the DefaultEditorDefinition.
-->
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition MinWidth="150" Width="*" />
<ColumnDefinition MaxWidth="530" Width="2.5*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" >
<Button Content="Button" Margin="20" GotFocus="OnControlGetFocus" />
<TextBox Text="TextBox" Margin="20" GotFocus="OnControlGetFocus"/>
<CheckBox Content="CheckBox" Margin="20" GotFocus="OnControlGetFocus"/>
</StackPanel>
<!-- The SelectedObject property will be assigned in code-behind when one
of the 3 controls receives focus. -->
<xctk:PropertyGrid x:Name="_propertyGrid"
Grid.Column="1"
HorizontalAlignment="Stretch"
IsVirtualizing="True"/>
</Grid>
</Grid>
</local:DemoView>