or
<
telerik:RadWindow
x:Class
=
"ExpanderWpfApp.MainWindow"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
Height
=
"300"
Width
=
"300"
>
<
StackPanel
>
<
TextBox
/>
<
telerik:RadExpander
IsExpanded
=
"True"
IsTabStop
=
"False"
>
<
TextBox
/>
</
telerik:RadExpander
>
<
TextBox
/>
</
StackPanel
>
</
telerik:RadWindow
>
public class PropertyDefinitionList : List<
Telerik.Windows.Controls.Data.PropertyGrid.PropertyDefinition
>
{
public PropertyDefinitionList() { }
}
<
local:ObjectPropertyFilterList
x:Key
=
"PropertyDefinitions"
>
<
propertyGrid:PropertyDefinition
Binding
=
"{Binding Name}"
/>
<
propertyGrid:PropertyDefinition
Binding
=
"{Binding ID}"
/>
</
local:ObjectPropertyFilterList
>
I get a reference to this list in my code behind and call it PropertyList. At a certain
point I want to the property definitions to the .PropertyDefinitions collection on the
RadPropertyGrid, so in the function that does it I have the following code:rpg1.PropertyDefinitions.AddRange(propertyDefinitionList1);
rpg1.item = targetitem;
However when the code executes I get two blank definition entries in the property grid
display. There is no display name nor value. The properties definitely exist in the object
being assigned to "item", but its like these property definitions don't get their binding
set. In another thread it was stated that property definitions have their binding
evaluated when the .item property changes, so what is happening (or not happening) here? I
figure I must be doing something wrong.
Thanks!
<
telerik:RadGridView
Name
=
"DGV"
ItemsSource
=
"{Binding}"
CanUserInsertRows
=
"False"
AutoGenerateColumns
=
"False"
HorizontalAlignment
=
"Left"
Margin
=
"10,10,0,0"
VerticalAlignment
=
"Top"
Height
=
"300"
Width
=
"497"
><
br
> <
telerik:RadGridView.Columns
><
br
> <
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}"
Header
=
"Name"
><
br
> <
telerik:GridViewDataColumn.CellTemplate
><
br
> <
DataTemplate
><
br
> <
Label
Content
=
"{Binding Name}"
></
Label
><
br
> </
DataTemplate
><
br
> </
telerik:GridViewDataColumn.CellTemplate
><
br
> </
telerik:GridViewDataColumn
><
br
> <
br
> </
telerik:RadGridView.Columns
><
br
> <
br
> <
br
> </
telerik:RadGridView
><
br
><
div
></
div
>
public MainWindow()<
br
> {<
br
> InitializeComponent();<
br
> GetData();<
br
> }<
br
><
br
> public void GetData()<
br
> {<
br
> DataTable _dt = new DataTable();<
br
> _dt.Columns.Add("ID");<
br
> _dt.Columns.Add("Name");<
br
> _dt.Columns.Add("Percentage");<
br
> _dt.Rows.Add("1", "Ahmed", 25);<
br
> _dt.Rows.Add("2", "Ali", 60);<
br
> _dt.Rows.Add("3", "Mohamed", 80);<
br
> _dt.Rows.Add("3", "Mohamed2", 50);<
br
><
br
> DGV.DataContext = _dt;<
br
> }
Table ttable =
new
Table();
ttable.Style = MyTableStyle;
var TabRowColl = TableRowHelpCollection.Where(x => x.ParentTableId == item.ElementKey).ToList();
foreach
(var TR
in
TabRowColl)
{
TableRow TBLR =
new
TableRow();
TBLR.Height = 10;
// TBLR.Style = MyRowStyle;
foreach
(var TC
in
TR.TableCellCollection)
{
TableCell TBLC =
new
TableCell();
//TBLC.Style = new StyleDefinition ();
foreach
(var CB
in
TC.CellDocumentCollection)
{
if
(CB
is
Paragraph)
{
Paragraph PP =
new
Paragraph();
foreach
(var Child
in
CB.Children)
{
if
(Child
is
Span)
{
Span Spn =
new
Span((Child
as
Span).Text);
PP.Children.Add(Spn);
}
else
if
(Child
is
ImageInline)
{
}
}
TBLC.Children.Add(PP);
}
else
if
(CB
is
Table)
{
}
}
TBLR.Cells.Add(TBLC);
}
ttable.Rows.Add(TBLR);
}
CurrentSelectedSection.Children.AddAfter(CurrPara, ttable);
<
Window
ResxExtension.DefaultResxName
=
"GIT_CuadroMando.MasterGIT"
Language
=
"{UICulture}"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
x:Class
=
"GestorDocumental"
xmlns:x
=
"http://schemas.microsoft.com/winfx/2006/xaml"
Loaded
=
"Window_Loaded"
xmlns:local
=
"clr-namespace:GIT_CuadroMando"
xmlns:commands
=
"clr-namespace:Telerik.Windows.Media.Imaging.ImageEditorCommands.RoutedCommands;assembly=Telerik.Windows.Controls.ImageEditor"
xmlns:tools
=
"clr-namespace:Telerik.Windows.Media.Imaging.Tools;assembly=Telerik.Windows.Controls.ImageEditor"
Title
=
"{Resx TitleGestorDocumental}"
Height
=
"701"
Width
=
"1000"
ResizeMode
=
"CanResize"
WindowStyle
=
"ToolWindow"
>
<
telerik:RadImageEditorUI
x:Name
=
"BodyWorkAndPaintingTool"
Grid.ColumnSpan
=
"4"
Margin
=
"10,49,33,10"
Grid.Row
=
"1"
Grid.RowSpan
=
"4"
>
<
telerik:RadImageEditorUI.ImageToolsSections
>
<
telerik:ImageToolsSection
Header
=
"{Resx Disenador_Blur}"
>
<
telerik:ImageToolItem
ImageKey
=
"Resize"
Text
=
"Resize"
Command
=
"commands:ImageEditorRoutedCommands.ExecuteTool"
>
<
telerik:ImageToolItem.CommandParameter
>
<
tools:ResizeTool
x:Name
=
"resizeTool"
/>
</
telerik:ImageToolItem.CommandParameter
>
</
telerik:ImageToolItem
>
<
telerik:ImageToolItem
ImageKey
=
"Resize"
Text
=
"Canvas resize"
Command
=
"commands:ImageEditorRoutedCommands.ExecuteTool"
>
<
telerik:ImageToolItem.CommandParameter
>
<
tools:CanvasResizeTool
/>
</
telerik:ImageToolItem.CommandParameter
>
</
telerik:ImageToolItem
>
Private
Sub
Window_Loaded(sender
As
Object
, e
As
RoutedEventArgs)
CultureManager.UICulture = Thread.CurrentThread.CurrentCulture
' Thread.CurrentThread.CurrentUICulture = New CultureInfo("es")
End
Sub