or
<
DataTemplate
x:Key
=
"RadComboBoxItemTemplate"
>
<
CheckBox
Content
=
"{Binding}"
IsChecked
=
"{Binding Path=IsSelected,Mode=TwoWay}"
Height
=
"16"
HorizontalAlignment
=
"Left"
Margin
=
"2"
VerticalAlignment
=
"Top"
/>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"SelectionBoxTemplate"
>
<
TextBlock
Text
=
"{Binding SelectedItemsText,Mode=TwoWay}"
/>
</
DataTemplate
>
<
telerik:RadComboBox
Name
=
"cb_Others"
ItemTemplate
=
"{StaticResource RadComboBoxItemTemplate}"
SelectionBoxTemplate
=
"{StaticResource SelectionBoxTemplate}"
Grid.Column
=
"1"
Grid.Row
=
"3"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
Margin
=
"3,3,6,3"
/>
cb_Others.ItemsSource = AvailableOthers; // where AvailablesOthers is a List<
string
>
Hi,
Currently we are using a third party controls for generating Diagram (Process Flowchart) within our WPF application.
we are planning to move to your Diagram control to get rid of dependencies on multiple libraries but the only problem that's stopping us is "Export to Visio & PDF Feature is missing from the Diagram control"
Do you have any plans to include these features in your next release Q2 2012
Regards
Manoj
01.
// --- Part of CustomRadGradView.cs (inherits from RadGridView) ---
02.
03.
// Save this RadGridViews layout in background
04.
Task.Run(() =>
05.
{
06.
using
(var manager =
new
CustomPersistenceManager())
07.
{
08.
// this is current RadGridView
09.
manager.SaveLayout(
this
, file);
10.
}
11.
}
12.
}
01.
// --- Part of CustomPersistenceManager.cs (inherits from PersistenceManager) ---
02.
03.
// Save a layout of any Telerik control
04.
public
bool
SaveLayout(Control control,
string
file =
null
)
05.
{
06.
// Current thread has no access to control -> Invoke required
07.
if
(control.Dispatcher.CheckAccess() ==
false
)
08.
{
09.
bool
result =
false
;
10.
Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal,
new
Action(() => result = DoSaveLayout(control, file)));
11.
return
result;
12.
}
13.
14.
// Current thread has access to control
15.
return
DoSaveLayout(control, file);
16.
}
01.
// --- Part of CustomPersistenceManager.cs (inherits from PersistenceManager) ---
02.
03.
// save layout
04.
private
bool
DoSaveLayout(Control control,
string
file =
null
)
05.
{
06.
// this lines work without any errors so method is invoked correctly; thread has access to control!
07.
string
name = control.Name;
// returns name of control
08.
control.Name =
"New name"
;
// just for testing
09.
10.
// Next line always throws an InvalidOperationException
11.
using
(var stream = Save(control))
// call save method of Teleriks PersistenceManager class
12.
{
13.
stream.Seek(0, SeekOrigin.Begin);
14.
15.
using
(var reader =
new
StreamReader(stream))
16.
{
17.
string
text = reader.ReadToEnd();
18.
File.WriteAllText(path, text);
19.
}
20.
}
21.
}
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"*"
/>
</
Grid.ColumnDefinitions
>
<
ContentControl
Grid.Row
=
"0"
prism:RegionManager.RegionName
=
"{x:Static pll:RegionNames.BannerRegion}"
VerticalAlignment
=
"Top"
/>
<
telerikDocking:RadDocking
Grid.Row
=
"1"
Margin
=
"2"
>
<
telerikDocking:RadSplitContainer
Orientation
=
"Vertical"
InitialPosition
=
"DockedLeft"
MinWidth
=
"300"
>
<
telerikDocking:RadPaneGroup
>
<
telerikDocking:RadPane
CanUserClose
=
"False"
CanFloat
=
"False"
Header
=
"{x:Static resources:Resources.TaskBarPaneHeaderText}"
ContextMenuTemplate
=
"{x:Null}"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"*"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
ContentControl
Grid.Row
=
"0"
prism:RegionManager.RegionName
=
"{x:Static pll:RegionNames.TaskBarRegion}"
/>
<
ContentControl
Grid.Row
=
"1"
VerticalAlignment
=
"Bottom"
HorizontalAlignment
=
"Left"
Height
=
"300"
Width
=
"400"
prism:RegionManager.RegionName
=
"{x:Static pll:RegionNames.FooterRegion}"
/>
</
Grid
>
</
telerikDocking:RadPane
>
</
telerikDocking:RadPaneGroup
>
</
telerikDocking:RadSplitContainer
>
<
telerikDocking:RadDocking.DocumentHost
>
<
telerikDocking:RadSplitContainer
>
<
telerikDocking:RadPaneGroup
>
<
telerik:RadDocumentPane
CanUserPin
=
"False"
CanUserClose
=
"False"
CanFloat
=
"False"
PaneHeaderVisibility
=
"Hidden"
TitleTemplate
=
"{x:Null}"
ContextMenuTemplate
=
"{x:Null}"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
ContentControl
Grid.Row
=
"0"
Margin
=
"2,2,2,2"
prism:RegionManager.RegionName
=
"{x:Static pll:RegionNames.MenuBarRegion}"
/>
<
ContentControl
Grid.Row
=
"1"
Margin
=
"2,2,2,6"
prism:RegionManager.RegionName
=
"{x:Static pll:RegionNames.BreadCrumbRegion}"
/>
<
ContentControl
Grid.Row
=
"2"
Margin
=
"2,2,2,2"
prism:RegionManager.RegionName
=
"{x:Static pll:RegionNames.WorkSpaceRegion}"
/>
</
Grid
>
</
telerik:RadDocumentPane
>
</
telerikDocking:RadPaneGroup
>
</
telerikDocking:RadSplitContainer
>
</
telerikDocking:RadDocking.DocumentHost
>
</
telerikDocking:RadDocking
>
</
Grid
>
<
telerik:RadDropDownButton
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
DropDownOpening
=
"RadDropDownButton_DropDownOpening"
Content
=
"..."
>
<
telerik:RadDropDownButton.DropDownContent
>
<
TextBlock
Text
=
"Sample content"
/>
</
telerik:RadDropDownButton.DropDownContent
>
</
telerik:RadDropDownButton>
private
void
RadDropDownButton_DropDownOpening(
object
sender, RoutedEventArgs e )
{
e.Handled =
true
;
}