I am converting a WPF app using standard MS controls to Telerik controls, I have an expander that contains a user control, with the Telerik expander, when expanded the user control is never shown, yet with the standard MS expander it does. Here is an example of both
<
Expander Name="FirmBenefits" Header="Benefit Details" IsExpanded="False" FontWeight="Bold" Margin="3,0,3,0">
<detailViews:FirmDetailsBenefitsView/> <!-- this works and the user control is displayed-->
</
Expander>
<telerik:RadExpander Header="Benefit Details" Margin="3" VerticalAlignment="Top" HorizontalAlignment="Stretch" >
<telerik:RadExpander.Content>
<detailViews:FirmDetailsBenefitsView/> <!-- this DOESN'T work and the user control is NOT displayed-->
</telerik:RadExpander.Content>
</
telerik:RadExpander>
Suggestions ?
<
Window
x:Class
=
"AluminiumSystem.Dialogs.TestWindow"
Title
=
"TestWindow"
Height
=
"500"
Width
=
"500"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"1*"
/>
<
RowDefinition
Height
=
"1*"
/>
</
Grid.RowDefinitions
>
<
telerik:RadDataForm
Name
=
"radColourForm"
Grid.Row
=
"0"
ItemsSource
=
"{Binding Users}"
/>
<
telerik:RadGridView
Name
=
"radColourGrid"
Grid.Row
=
"1"
ItemsSource
=
"{Binding Users}"
CanUserFreezeColumns
=
"False"
RowIndicatorVisibility
=
"Collapsed"
/>
</
Grid
>
</
Window
>
public
partial
class
TestWindow : Window
{
public
TestWindow()
{
InitializeComponent();
DataContext =
new
Entities();
}
}
Hello the filters doesn’t appears when I bind a TreeListView to a specific model, the approach of the model is similar as this:
public class A
{
private static readonly ObservableCollection<A> _children = new ObservableCollection<A>();
public static ObservableCollection<A> Children
{
get { return _children; }
}
}
public class B : A
{
public string Name { get; set; }
public string Type { get; set; }
public virtual void LoadChildren()
{
// add some A items
for (int i = 0; i < 10; i++)
{
Children.Add(new B{Name = i.ToString(),Type = "string"});
}
}
}
public class C : B
{
public override void LoadChildren()
{
// add some C items
for (int i = 0; i < 10; i++)
{
Children.Add(new C { Name = i.ToString(), Type = "string" });
}
}
}
MainWindow.xaml:
<telerik:RadTreeListView x:Name="tv">
<telerik:RadTreeListView.ChildTableDefinitions>
<telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}" />
</telerik:RadTreeListView.ChildTableDefinitions>
<telerik:RadTreeListView.Columns>
<telerik:GridViewDataColumn Width="*"
DataMemberBinding="{Binding Name}"
Header="Name"/>
<telerik:GridViewDataColumn Width="Auto"
MinWidth="150"
DataMemberBinding="{Binding Type}"
Header="Type"
HeaderTextAlignment="Center" />
</telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>
Mainwindow.cs
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var b = new B();
b.LoadChildren();
var c = new C();
c.LoadChildren();
tv.ItemsSource = A.Children;
}
Thanks in advance.
// Load Docx
RadDocument document = null;
IDocumentFormatProvider providerDocx = new DocxFormatProvider();
using (FileStream stream = File.Open(@"C:\Test.docx", FileMode.Open))
{
document = providerDocx.Import(stream);
}
// Change Document
document.Selection.Clear();
DocumentTextSearch search = new DocumentTextSearch(document);
foreach (var textRange in search.FindAll("Company"))
{
document.Selection.AddSelectionStart(textRange.StartPosition);
//document.Selection.AddSelectionEnd(textRange.EndPosition); // Necessary?
}
StyleDefinition style= new StyleDefinition();document.Insert("My Business", style); // Company should be changed to My Business
// Save Pdf
PdfFormatProvider providerPdf = new PdfFormatProvider();
using (Stream output = File.Open(@"C:\Test.pdf", FileMode.Create))
{
providerPdf.Export(document, output);
}
Any comments?
Thankx, Harry
<
Controls1:RadDropDownButton
Name
=
"Report"
Content
=
"Report"
Margin
=
"5,0,0,0"
>
<
Controls1:RadDropDownButton.DropDownContent
>
<
Controls2:RadContextMenu
Name
=
"ReportMenu"
StaysOpen
=
"False"
ItemsSource
=
"{Binding ReportList}"
KeyboardNavigation.IsTabStop
=
"True"
/>
</
Controls1:RadDropDownButton.DropDownContent
>
</
Controls1:RadDropDownButton
>