Telerik Forums
UI for WPF Forum
1 answer
88 views
I have defined a RadDocking in my MainWindow.xaml. At program startup, I want to load a layout from a resource XML file. Should I do this in the MainWindow's Loaded event?

In an ideal world, I would just include the xml in the XAML:
<include MyDockingConfiguration.xml />

Perhaps this can be done using ContentControl and a ControlTemplate?
Vladi
Telerik team
 answered on 12 Feb 2013
3 answers
201 views
Hi,

1. I installed wpf demo controls on machine and i am working with them. but how can i access solution files for those controls.?

Why i am asking is the code you provided in the demo installer missing some stuff.

I am trying to see how treeview control works in WPF but it is missing some important file.

Goto FirstLook of RadTreeView Control 
   Select Code
       Select Examle.xaml
         at the bottom of the file there is code like 
  <project:ContentControlEx Grid.Column="2"
    TemplateSelector="{StaticResource DetailsTemplateSelector}"
    DataContext="{Binding Path=SelectedItem, ElementName=xTreeView}" Content="{Binding}" />

but i dont see any ContentControlEx in the code files

Please provide those files or where can i find demo solution projects

Thanks
Rama


Pavel R. Pavlov
Telerik team
 answered on 11 Feb 2013
1 answer
261 views
In an earlier thread, Ivan wrote:

    "You can create a new ControlTemplate for DataFormValidationSummary and set it through RadDataForm's ValidationSummaryStyle property. In this ControlTemplate you can set a new ItemTemplate to the ItemsControl placed in the summary. Please, use the latest internal build, if possible, as we have fixed a related issue there."

I'm trying to do this, but I'm only about half-way there.

I'm setting ValidationSummaryStyle on the RadDataForm:
<telerik:RadDataForm
        ...
        ValidationSummaryStyle="{StaticResource validationSummaryStyle}"
        />
And in Resources I'm defining the style that sets DataFormValidationSummary.Template, and the ControlTemplate that it is being set to.
<UserControl.Resources>
 
    <ControlTemplate x:Key="validationSummaryTemplate">
        <Label>Foo</Label>
    </ControlTemplate>
 
    <Style TargetType="telerikDataForm:DataFormValidationSummary" x:Key="validationSummaryStyle">
        <Setter Property="Template" Value="{StaticResource validationSummaryTemplate}" />
    </Style>
</UserControl.Resources>
And this works, so far is it goes.  I see the string "Foo" in the appropriate spot.

But I'm unclear as to what "set a new ItemTemplate to the ItemsControl placed in the summary" is supposed to mean. 
Ivan Ivanov
Telerik team
 answered on 11 Feb 2013
2 answers
163 views
Hi,

I have to design a grid which is having a multiple headers (Grey shaded part shown in the attached sample image). First header with a check box and second header is static just displays a value lika label and the Third header which shows total number of rows entered in the grid and the sum of the row values. Then the fourth header displays the column headers.

For the sample i have shown the three grids, it can be n number of grids dynamically added and all the grid rows are editable.

Can someone help me in this?

Thanks,
Subash
Subash
Top achievements
Rank 1
 answered on 11 Feb 2013
1 answer
97 views
HI,

i use a RadDocking- Control and add Panes by code:
RadPane radPane = new RadPane() { Title = panename_s, Name = name_s };
RadDocking.SetSerializationTag(radPane, panename_s);
RadPaneGroup radPaneGroup = new RadPaneGroup();
RadSplitContainer radSplitContainer = new RadSplitContainer() { InitialPosition = DockState.FloatingDockable };
 
Controls.LayoutData MyControl = new Controls.LayoutData();
MyControl.Name = name_s;
radPane.Content = MyControl;
radPaneGroup.Items.Add(radPane);
radSplitContainer.Items.Add(radPaneGroup);
Docking.Items.Add(radSplitContainer);

This works fine. Now add one  (AAA) Pane and save this layout to a xml-file. A second pane will be created (BBB). Now i delete
the second pane (BBB) and save the layout again. How do i delete this second pane from the LayoutStream? In my void "Docking_Element"-Method this second pane is still shown!

Thanks
Best Regards
Rene

Vladi
Telerik team
 answered on 11 Feb 2013
1 answer
147 views
hi,

i create some RadPanes by code. Later i have to save some informations in a database. How do i
get all of the RadPanes i created? Or better how do i get one by the title of a RadPane?

Thanks
Best Regards
rene
Vladi
Telerik team
 answered on 11 Feb 2013
1 answer
81 views
Hi,

i tried you exmaple to load my laypout, but i geht this error-message:
"The path specified format is not supported."
string path_s = Klassen.helper.WPFAnwendung_Path() + "\\Layout\\laoyut.xml";
    
// Load your layot from the isolated storage.
using ( IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForAssembly() )
{
      using (var isoStream = storage.OpenFile("E:\\WPF_Dev\\ITA-Reporting\\ITA-Reporting\\bin\\Debug\\Layout\\Layout.xml", FileMode.Open))
{
this.Docking.LoadLayout( isoStream );
             }

What's the problem? The path is ok, file does exist!

thanks
best Regards
rene
Vladi
Telerik team
 answered on 11 Feb 2013
1 answer
151 views
Hi,

i add a RadPane dynamically by clicking a button.
{
RadPane radPane = new RadPane() { Content = new Controls.LayoutData() };
RadPaneGroup radPaneGroup = new RadPaneGroup();
RadSplitContainer radSplitContainer = new RadSplitContainer() { InitialPosition = DockState.FloatingDockable };
radPaneGroup.Items.Add(radPane);
radSplitContainer.Items.Add(radPaneGroup);
Docking.Items.Add(radSplitContainer);
}

As you can see the Content of the RadPane ist a Usercontrol called "Controls.LayoutData". In this Control i can choose a Report,
which is shown in the Control.

But how do i save this layout?

This way just save the Layout with empty RadPanes:
try
{
      MemoryStream stream = new MemoryStream();
      this.Docking.SaveLayout(stream);
 
      stream.Seek(0, SeekOrigin.Begin);
      StreamReader reader = new StreamReader(stream);
      string xml_s = reader.ReadToEnd();
 
      string path_s = Klassen.helper.WPFAnwendung_Path() + "/Layout/laoyut.xml";
      using (StreamWriter Mywriter = new StreamWriter(@path_s))
      {
           Mywriter.Write(xml_s);
           Mywriter.Close();
           Mywriter.Dispose();
       }
}

how do I save the contents of the newly created/all RadPanes????

Thanks a lot
Best Regards
Rene
Boyan
Telerik team
 answered on 11 Feb 2013
6 answers
308 views
I have a radpane which can have different viewmodels as a datatemplate. I attached my object to the content of the radpane.
When the pane is docked there is not issue, but when the pane is in the floating state, the templated control only shows the datatype of the viewmodel.

 <telerik:RadPane x:Name="paneManufacturers" 
                 Header="{x:Static Properties:Resources.LabelLibraryExplorer}"
           Content="{Binding AvailableItems}">
</telerik:RadPane>
D
Top achievements
Rank 1
 answered on 11 Feb 2013
0 answers
326 views
Specifically i want to change the background color of the RadDatePicker (as well as the whole row) when i am changing the currently selected row with the up/down arrow keys.

To change the color of current row (highlighted) is achieved somewhat using Style.Triggers as per the following code:

<telerik:RadGridView Name="tlrkGridView" 
                     IsFilteringAllowed="False" ShowGroupPanel="False" CanUserSortColumns="False" IsSynchronizedWithCurrentItem="True"
                     ItemsSource="{Binding Players}"
                     AutoGenerateColumns="False">
    <telerik:RadGridView.RowStyle>
        <Style TargetType="{x:Type telerik:GridViewRow}">
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="Background" Value="AliceBlue"></Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
    </telerik:RadGridView.RowStyle>
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Number}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Country}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding StartDate}" DataFormatString="{} {0: d/MM/yyyy}" Header="Custom Header">
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                    <telerik:RadDatePicker x:Name="datePicker" DateTimeWatermarkContent="<Select a date>" SelectedValue="{Binding StartDate, Mode=OneWay}" />
                </DataTemplate>
            </telerik:GridViewDataColumn.CellTemplate>
            <telerik:GridViewDataColumn.CellEditTemplate>
                <DataTemplate>
                    <telerik:RadDatePicker x:Name="datePickerEdit" DateTimeWatermarkContent="<Select a date>" SelectedValue="{Binding StartDate, Mode=TwoWay}" />
                </DataTemplate>
            </telerik:GridViewDataColumn.CellEditTemplate>
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding EndDate}" DataFormatString="{} {0: d/MM/yyyy}"  />
        <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding ClubID}" 
                                        ItemsSource="{Binding Clubs, Source={StaticResource MyViewModel}}"
                                        SelectedValueMemberPath="ID" >
            <telerik:GridViewComboBoxColumn.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition />
                            <ColumnDefinition Width="*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="{Binding ID}"/>
                        <TextBlock Text=" - " Grid.Column="1"/>
                        <TextBlock Text="{Binding Name}"  Grid.Column="2"/>
                    </Grid>
                </DataTemplate>
            </telerik:GridViewComboBoxColumn.ItemTemplate>
        </telerik:GridViewComboBoxColumn>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

But HOW TO MAKE THE TRIGGER AFFECT/SET THE STYLE OF THE RadDatePicker which is contained within the RadGridView? Is it do-able in XAML ?

Basically i want to make the color of a selected row (the whole row) the same, regardless of whether it contains default column types, or other controls within a column. The GridViewComboBoxColumn behaves as expected, and EndDate field in my example behaves as expected. The reason i am using a RadDatePicker is because i want to show the Calendar icon in cell view mode.
Joe
Top achievements
Rank 1
 asked on 11 Feb 2013
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?