Telerik Forums
UI for WPF Forum
0 answers
109 views
I am using version 2012.1.326.35.

I have a RadGridView with a DataTable dt as ItemsSource. The RadGridView appears to render the initial column specification correctly and also recognize the row changes. However, when I update the columns, then I notice that addition and removal of columns are not recognized in the RadGridView.

This is how I refresh my DataTable:

================================================
public void updateData(SomeCustomDataSource data)
dt.Clear();
int num_cols = model.Columns.Length;
for (int i = 0; i < num_cols; i++)
{
SomeCustomColumn c = data.Columns[i];
if (!dt.Columns.Contains(.Name)) // Adding columns not previously existing
{
DataColumn col = CreateDataColumn(c);
dt.Columns.Add(col);
}
}
dt.AcceptChanges();
RefreshGrid(); // Plain old OnPropertyChanged("DataSource");
================================================
I'd like to note that this is just some dummy code. In the actual code I wanted to use, I called dt.Columns.Clear() and re-added every single column on data update. And what happens in that case is that none of the columns changed but when I click on the "click to add new row" row insertion thing, I get a "[Column] does not belong to Table [Table]" ArgumentException, which implies the internal data is not actually refreshed in the RadGridView even though the rows are updated correctly.

Again, if you want my license key in order to provide support, I'd be happy to provide it.
New
Top achievements
Rank 1
 asked on 18 Jan 2013
3 answers
112 views
Hello,

we are using Telerik WPF Controls Version Q2 2011 0920.

We have a scenario where we want to programmatically move TileViewItems from one TileView to another. This is done by removing the item from the RadTileView.Items Collection and adding it to the other in code behind.
The issue is that the header is disappearing if we do that (plain text defined in XAML with HEADER Property) and is doesn't come back if we move the TileViewItem back to the original TileView.

Update: Header-Property is correct after the move but the UI isn't showing anything.

Thanks,

Thomas
Zarko
Telerik team
 answered on 18 Jan 2013
1 answer
102 views

I do not even know where to start with this. I can build a tree that has parents and children, but I cannot figure out how to make it where it is not always symmetric. This is a validation tree so it tells the user error messages. For example, it should look like this:


    Object ID (Main Property)
    - Must start with a number (Description)
    Employee Name (Main Property)
          Employee 1 (SubProperty)
                - Cannot be blank (Description)
          Employee 2 (Subproperty)
                - Cannot be blank (Description)

Any help with this or something that would lead me in the right direction would be helpful. This is my first time working with trees in WPF/C# so please be kind haha.

Tina Stancheva
Telerik team
 answered on 18 Jan 2013
2 answers
80 views
Hi,

I am seeing two different behaviors from RadGridView control for WPF when I use the SelectAll function from two
different versioned libraries (Version: 2011.3.1116.40 & Version: 2012.2.912.40).

In my example I have a RadGridView which I populate with some dummy data. I have added a RowDetailsTemplate
which is Visible when the row is selected. Everything works consistently in both libraries when the row details are
selected one at a time. But when I make use of the SelectAll function I see that the row highlight is missing with
the new versioned library

Images are attached
Mark
Top achievements
Rank 1
 answered on 18 Jan 2013
1 answer
149 views
When I drag a new appointment onto the schedule view the default length is always set to 1 hour and and I can not adjust it until the OnEndEdit is fired off. Is there any way to adjust this length during either the AppointmentEditing or AppointmentSaving events?
Yana
Telerik team
 answered on 18 Jan 2013
4 answers
117 views
Hi guys,

I have a strange problem, I'm using the telerik wpf docking controls version 2012.3.1203.40 with VS2012 when my touchscreen is connected to my pc by USB (touchscreen: iiyama prolite T2250MTS) the RadDockingAutomationPeer throw an nullreference exception on loading.
If the touchscreen is not connected everything works just fine.

I tried to create a testproject for you, but the testproject throws an ArgumentNullException in the RadTabControlAutomationPeer, in this project I'm not using the RadTabControl.
And again if the touchscreen is not connected everything works fine.

The workaround is easy, just disconnect the touchscreen :-). For now this is my workaround, but it is no solution

Can you check it out?

How do I upload my test project?

David.
david
Top achievements
Rank 1
 answered on 18 Jan 2013
4 answers
378 views

telerik RadDocking vs. Prism problems

 

The telerik RadDocking vs. Prism problems are a “show stopper”.  I have invested over fifty hours and cannot get Prism ViewInjection (regionManager.RequestNavigate) to work with telerik RadPanes.

 

Injected telerik RadPane views appear when they are first injected, but the Prism ConfirmNavigationRequest methods are only ever called on the first Injected View.  The same methods on the other ones never fire, and no existing view ever becomes the top view when navigating back.  The top view is ALWAYS the last view injected.  I tried getting a reference from the view model to the view to force the view to the top layer (Bad developer - I know!), but I cannot get a handle to the telerik RadPane views from my view models because they are registered without a Name as a result of using MEF and Prism RequestNavigate.

 

I expected telerik to give me productivity gains, but right now telerik has been a huge drain on my productivity.  In a few more hours I am going to tell my client I cannot get the product built using telerik RadDocking.

We are using VS2010 SP1, .NET 4, WPF, telerik Apr 19, 2011 Q1 2011 SP1 (version 2011.1.0419), Prism 4.

 

Sincerely, Joe

 

ShellView.xaml:

<telerik:RadDocking Padding="0">

  <!-- NavigationRegion -->

  <telerik:RadSplitContainer InitialPosition="DockedLeft">

    <telerik:RadPaneGroup prism:RegionManager.RegionName="{x:Static inf:RegionNames.NavigationRegion}"

    IsManipulationEnabled="False"/>

  </telerik:RadSplitContainer>

  <!-- ActionsPaneRegion -->

  <telerik:RadSplitContainer InitialPosition="DockedRight">

    <telerik:RadPaneGroup prism:RegionManager.RegionName="{x:Static inf:RegionNames.ActionsPaneRegion}"/>

  </telerik:RadSplitContainer>

  <!-- WorkAreaRegion -->

  <telerik:RadSplitContainer InitialPosition="DockedTop" telerik:DockingPanel.InitialSize="556,717">

    <telerik:RadPaneGroup prism:RegionManager.RegionName="{x:Static inf:RegionNames.WorkAreaRegion}" 

    IsManipulationEnabled="False"/>

  </telerik:RadSplitContainer>

</telerik:RadDocking>

 

NavigationViewModel.cs:

workAreaRegion.Context = selectedTreeViewItem;
UriQuery query = new UriQuery();
query.Add("Action""Edit Level");
regionManager.RequestNavigate
(
  RegionNames.WorkAreaRegion,
  new Uri(ViewNames.MarketPropertiesView + query.ToString(), UriKind.Relative),
  a => { }
);

 

WorkAreaViewModel.cs:

#region ConfirmNavigationRequest
 
public void ConfirmNavigationRequest(Microsoft.Practices.Prism.Regions.NavigationContext navigationContext, 
  System.Action<bool> continuationCallback)
{
  // Use this interface if you want to prevent the user from navigating 
  // away from a view before the view is completed. 
  continuationCallback(true);
}
 
public bool IsNavigationTarget(Microsoft.Practices.Prism.Regions.NavigationContext navigationContext)
{
  // A value of true indicates that this View/ViewModel is the one to handle this navigation request. 
  return true;
}
 
public void OnNavigatedFrom(Microsoft.Practices.Prism.Regions.NavigationContext navigationContext)
{
  // Use this event for logic BEFORE navigation leaves this View/ViewModel 
  // For example, record which UI control has focus so that when the view is navigated back to,  
  // focus can be restored to the UI control that previously had focus. 
  return;
}
 
public void OnNavigatedTo(Microsoft.Practices.Prism.Regions.NavigationContext navigationContext)
{
  // Use this event to initialize/refresh this View/ViewModel. 
  // Use this method to initiate loading of data and to restore focus to the  
  // UI Control that had focus when the object was navigated away from. 
 
  if (isFirstTime == true)
    isFirstTime = false;
 
  // Get passed NavigationContext URI parameters. 
  if (navigationContext != null)
    Action = navigationContext.Parameters["Action"];
 
  return;
}
 
#endregion ConfirmNavigationRequest

 

George
Telerik team
 answered on 18 Jan 2013
2 answers
189 views
Hi,

I have a quesiton about the dictionary used in Telerik spellchecker, is it compatible or shared with MS WPF spellcheck
feature? My problem is that part of my application will use MS WPF spellcheck and part will use Telerik's, so we hope
that the dictionaries can be shared through the application. If the answer is yes, can you give a little details for the
implementation?

Thanks.

Henry
Henry
Top achievements
Rank 1
 answered on 17 Jan 2013
23 answers
1.0K+ views

Hi,

I have a WPF application. I am using Telerik controls v4.0.30319.

I am running into memory leaks using the RadGridView. The first scenario is straight forward, I am binding to a ViewModel’s Observable Collection but when I update the Collection it does not release the memory for the old objects. The second scenario I have created DataTemplate with Textbox’s in the rows and the RadGridView will not release the textbox’s.

<myViews:BaseUserControl xmlns:myViews="clr-namespace:EnconWPF.Views"

                         xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

                         x:Class="EnconWPF.Views.ScreenBdetl"

                         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

                         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

                         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

                         xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"

                         xmlns:my="clr-namespace:EnconWPF"

                         xmlns:myViewModel="clr-namespace:EnconWPF.ViewModels"

                         mc:Ignorable="d"

                         d:DesignWidth="950">

    <myViews:BaseUserControl.Resources>

        <Style TargetType="my:CoreTextBox"

               BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:Windows7Theme, ElementType=TextBox}}" />

        <my:NullableStringConverter x:Key="NullableStringConverter" />

        <my:BwzConverter x:Key="BwzConverter" />

        <my:PhoneNumberConverter x:Key="PhoneNumberConverter" />

    </myViews:BaseUserControl.Resources>

    <Grid x:Name="LayoutRoot"

          Style="{StaticResource GradientBlueGridStyle}">

 

        <Grid>

            <Grid.RowDefinitions>

                <RowDefinition Height="85" />

                <RowDefinition Height="0" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="26" />

                <RowDefinition Height="30*" />

            </Grid.RowDefinitions>

            <Grid.ColumnDefinitions>

                <ColumnDefinition Width="20" />

                <ColumnDefinition Width="30" />

                <ColumnDefinition Width="*" />

                <ColumnDefinition Width="30" />

                <ColumnDefinition Width="20" />

            </Grid.ColumnDefinitions>

            <my:Toolbar  x:Name="toolBar"

                         Height="85"

                         Grid.Row="0"

                         Grid.Column="0"

                         Grid.ColumnSpan="5" />

            <TextBlock Text="{Binding ApplicationStrings.BROKER, Source={StaticResource ResourceWrapper}}"

                       Grid.Row="3"

                       Grid.Column="2"

                       Margin="10,0,0,0" />

            <my:CoreTextBox Grid.Row="3"

                            Grid.Column="2"

                            Margin="120,0,0,0"

                            Width="54"

                            Text="{Binding  Account.ACCOUNTNUMBER, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True, Converter={StaticResource BwzConverter}}"

                            IsReadOnly="True" Display="ModifyAdd"

                            IsTabStop="{Binding Path=IsControlTabStop}"

                            MaxLength="6"

                            TabIndex="1" />

            <my:CoreTextBox Grid.Row="3"

                            Grid.Column="2"

                            Margin="185,0,0,0"

                            Width="270"

                            Text="{Binding Account.CONDENSEDNAMEACT, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                            IsReadOnly="True" Display="ModifyAdd"

                            IsTabStop="{Binding Path=IsControlTabStop}"

                            MaxLength="30"

                            TabIndex="2" />

            <TextBlock Text="{Binding ApplicationStrings.BROKER_NUM, Source={StaticResource ResourceWrapper}}"

                       Grid.Row="5"

                       Grid.Column="2"

                       Margin="10,0,0,0" />

            <my:CoreTextBox  Grid.Row="5"

                             Grid.Column="2"

                             Margin="120,0,0,0"

                             MaxLength="30"

                             Width="270"

                             Text="{Binding Account.ACCOUNTNAME, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                             IsReadOnly="True" Display="ModifyAdd"

                             IsTabStop="{Binding Path=IsControlTabStop}"

                             TabIndex="4" />

            <TextBlock Text="{Binding ApplicationStrings.ADDRESS, Source={StaticResource ResourceWrapper}}"

                       Grid.Row="6"

                       Grid.Column="2"

                       Margin="10,0,0,0" />

            <my:CoreTextBox Grid.Row="6"

                            Grid.Column="2"

                            Margin="120,0,0,0"

                            MaxLength="30"

                            Width="270"

                            Text="{Binding Account.ADDRESS1, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                            IsReadOnly="True" Display="ModifyAdd"

                            IsTabStop="{Binding Path=IsControlTabStop}"

                            TabIndex="6" />

            <TextBlock Text=""

                       Grid.Row="7"

                       Grid.Column="2"

                       Margin="170,0,0,0" />

            <my:CoreTextBox Grid.Row="7"

                            Grid.Column="2"

                            Margin="120,0,0,0"

                            Width="270"

                            Height="24"

                            Text="{Binding Account.ADDRESS2, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                            IsReadOnly="True" Display="ModifyAdd"

                            IsTabStop="{Binding Path=IsControlTabStop}"

                            MaxLength="30"

                            TabIndex="7" />

            <TextBlock Text=""

                       Grid.Row="8"

                       Grid.Column="2"

                       Margin="170,0,0,0" />

            <my:CoreTextBox  Grid.Row="8"

                             Grid.Column="2"

                             Margin="120,0,0,0"

                             Width="270"

                             Text="{Binding Account.ADDRESS3, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                             IsReadOnly="True" Display="ModifyAdd"

                             IsTabStop="{Binding Path=IsControlTabStop}"

                             MaxLength="30"

                             TabIndex="8" />

            <TextBlock Text=""

                       Grid.Row="9"

                       Grid.Column="2"

                       Margin="170,0,0,0" />

            <my:CoreTextBox   Grid.Row="9"

                              Grid.Column="2"

                              Margin="120,0,0,0"

                              Width="270"

                              Text="{Binding Account.ADDRESS4, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                              IsReadOnly="True" Display="ModifyAdd"

                              IsTabStop="{Binding Path=IsControlTabStop}"

                              MaxLength="30"

                              TabIndex="9" />

            <TextBlock  Text="{Binding ApplicationStrings.PROVINCE, Source={StaticResource ResourceWrapper}}"

                        Grid.Row="10"

                        Grid.Column="2"

                        Margin="10,0,0,0" />

            <my:CoreTextBox   Grid.Row="10"

                              Grid.Column="2"

                              Margin="120,0,0,0"

                              MaxLength="2"

                              Width="26"

                              Text="{Binding Ml.ML_CODE_MAST, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                              IsEnabled="{Binding Path=IsControlEnabled}"

                              IsReadOnly="True"

                              Display="InquireModifyAdd"

                              IsTabStop="False"

                              TabIndex="10" />

            <TextBlock  Text=""

                        Grid.Row="10"

                        Grid.Column="2"

                        Margin="200,0,0,0"

                        Visibility="{Binding Path=IsHideInFind}" />

            <my:CoreTextBox Grid.Row="10"

                            Grid.Column="2"

                            Margin="180,0,0,0"

                            Width="180"

                            Text="{Binding Ml.ML_NAME_MAST, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                            IsEnabled="{Binding Path=IsControlEnabled}"

                            IsReadOnly="True"

                            Display="InquireModifyAdd"

                            IsTabStop="False"

                            MaxLength="20"

                            Visibility="{Binding Path=IsHideInFind}"

                            TabIndex="11" />

            <TextBlock  Text="{Binding ApplicationStrings.POSTAL, Source={StaticResource ResourceWrapper}}"

                        Grid.Row="10"

                        Grid.Column="2"

                        Margin="500,0,0,0" />

            <my:CoreTextBox   Grid.Row="10"

                              Grid.Column="2"

                              Margin="580,0,0,0"

                              MaxLength="10"

                              Width="90"

                              Text="{Binding Account.ZIPCODE, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                              IsReadOnly="True" Display="ModifyAdd"

                              IsTabStop="{Binding Path=IsControlTabStop}"

                              TabIndex="12" />

            <TextBlock  Text="{Binding ApplicationStrings.PHONE, Source={StaticResource ResourceWrapper}}"

                        Grid.Row="5"

                        Grid.Column="2"

                        Margin="500,0,0,0" />

            <my:CoreTextBox Grid.Row="5"

                            Grid.Column="2"

                            Margin="580,0,0,0"

                            Width="100"

                            Height="24"

                            HorizontalAlignment="Left"

                            FontSize="11"

                            Text="{Binding Account.PHONENUM, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True, Converter={StaticResource PhoneNumberConverter}}"

                            IsReadOnly="True" Display="ModifyAdd"

                            IsTabStop="{Binding Path=IsControlTabStop}"

                            MaxLength="12"

                            TabIndex="5" />

            <TextBlock  Text="{Binding ApplicationStrings.ACTDEAD, Source={StaticResource ResourceWrapper}}"

                        Grid.Row="3"

                        Grid.Column="2"

                        Margin="500,0,0,0" />

            <my:CoreTextBox Grid.Row="3"

                            Grid.Column="2"

                            Margin="580,0,0,0"

                            MaxLength="2"

                            Width="26"

                            Height="24"

                            HorizontalAlignment="Left"

                            FontSize="11"

                            Text="{Binding Account.ACTIVEDEAD, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                            IsReadOnly="True" Display="ModifyAdd"

                            IsTabStop="{Binding Path=IsControlTabStop}"

                            TabIndex="3" />

            <Border Width="Auto"

                    Height="25"

                    Grid.Row="12"

                    Grid.Column="1"

                    Grid.ColumnSpan="3"

                    CornerRadius="5,5,0,0"

                    Visibility="{Binding Path=IsHideInFind}"

                    Background="#FF112A5D" />

            <Button  Height="20"

                     x:Name="Append"

                     Width="20"

                     HorizontalAlignment="Left"

                     Grid.Column="1"

                     Margin="5,0,0,0"

                     Grid.Row="12"

                     ToolTipService.ToolTip="{Binding Source={StaticResource ResourceWrapper}, Path=ApplicationStrings.APPENDBUTTON}"

                     Style="{StaticResource AppendButtonStyle}"

                     Visibility="{Binding IsAppendVisible}"

                     Command="{Binding AppendCommand}">

            </Button>

            <Border Width="Auto"

                    Height="Auto"

                    CornerRadius="3"

                    Grid.Row="13"

                    Grid.Column="1"

                    Grid.ColumnSpan="3"

                    Grid.RowSpan="10"

                    HorizontalAlignment="Left"

                    Visibility="{Binding Path=IsHideInFind}">

 

            </Border>

            <telerik:RadGridView x:Name="SCREEN_BDETL_DetailList"

                                 Grid.Row="13"

                                 Grid.Column="1"

                                 Grid.ColumnSpan="3"

                                 Grid.RowSpan="12"

                                 Height="255"

                                 ItemsSource="{Binding BrokerCollection}"

                                 Visibility="{Binding Path=IsHideInFind}"

                                 ShowGroupPanel="True"

                                 IsEnabled="{Binding Path= IsControlEnabled}"

                                 Width="Auto"

                                 telerik:StyleManager.Theme="Windows7"

                                 VerticalAlignment="Top"

                                 AutoGenerateColumns="False"

                                 CanUserFreezeColumns="False"

                                 IsFilteringAllowed="True"

                                 IsReadOnly="True"

                                 RowIndicatorVisibility="Collapsed"

                                 FontFamily="Arial"

                                 IsTabStop="False"

                                 ScrollViewer.VerticalScrollBarVisibility="Auto"

                                 ScrollViewer.HorizontalScrollBarVisibility="Auto">

                <telerik:RadGridView.Resources>

                    <DataTemplate x:Key="EditButtonColumnResource">

                        <Button x:Name="EditRowCommand"

                                Style="{StaticResource GridImageButton}"

                                Command="{Binding DataContext.EditDetailCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}}"

                                CommandParameter="{Binding RelativeSource={RelativeSource Self}}">

                            <Button.Content>

                                <Image Source="/EnconWPF;component/Images/Toolbar/Edit.png"

                                       Width="13"

                                       Height="13"

                                       Stretch="Uniform"

                                       ToolTipService.ToolTip="{Binding Source={StaticResource ResourceWrapper}, Path=ApplicationStrings.EditButton}" />

                            </Button.Content>

                        </Button>

                    </DataTemplate>

                    <DataTemplate x:Key="DeptResourceColumn">

                        <my:CoreComboBox IsEditable="True"

                                         SelectedValue="{Binding Dept, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, Converter={StaticResource NullableStringConverter}}"

                                         IsReadOnly="True"

                                         Display="Inquire"

                                         Width="60"

                                         TabIndex="15"

                                         Values=",SRD,AE,COIN,DO,MAIN,ACCT" />

                    </DataTemplate>

                    <DataTemplate x:Key="FaxResourceColumn">

                        <my:CoreTextBox Text="{Binding Fax, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True, Converter={StaticResource PhoneNumberConverter}}"

                                        MaxLength="16"

                                        Width="124"

                                        TabIndex="16"

                                        Display="Inquire" />

                    </DataTemplate>

                    <DataTemplate x:Key="EmailResourceColumn">

                        <my:CoreTextBox Text="{Binding Email, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                                        MaxLength="80"

                                        Width="530"

                                        TabIndex="17"

                                        Display="Inquire" />

                    </DataTemplate>

                    <DataTemplate x:Key="TierResourceColumn">

                        <my:CoreTextBox Text="{Binding Tier, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                                        Width="50"

                                        TabIndex="18"

                                        Display="Inquire" />

                    </DataTemplate>

                    <DataTemplate x:Key="CancelColumnResource">

                        <Button x:Name="CancelRowCommand"

                                Style="{StaticResource GridImageButton}"

                                IsEnabled="{Binding IsAltered, Mode=TwoWay}"

                                Command="{Binding DataContext.CancelDetailCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}}"

                                CommandParameter="{Binding RelativeSource={RelativeSource Self}}">

                            <Button.Content>

                                <Image Source="/EnconWPF;component/Images/Toolbar/Undo.png"

                                       Width="13"

                                       Height="13"

                                       Stretch="Uniform"

                                       ToolTipService.ToolTip="{Binding Source={StaticResource ResourceWrapper}, Path=ApplicationStrings.CancelDetailButton}" />

                            </Button.Content>

 

                        </Button>

                    </DataTemplate>

                    <DataTemplate x:Key="DeleteColoumnResource"

                                  x:Name="DeleteColoumnResource">

                        <Button x:Name="DeleteRowCommand"

                                Style="{StaticResource GridImageButton}"

                                Command="{Binding DataContext.DeleteDetailCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}}"

                                CommandParameter="{Binding RelativeSource={RelativeSource Self}}">

                            <Button.Content>

                                <Image Source="/EnconWPF;component/Images/Toolbar/Delete.png"

                                       Width="13"

                                       Height="13"

                                       Stretch="Uniform"

                                       ToolTipService.ToolTip="{Binding Source={StaticResource ResourceWrapper}, Path=ApplicationStrings.DeleteDetailButton}" />

                            </Button.Content>

 

                        </Button>

                    </DataTemplate>

                </telerik:RadGridView.Resources>

 

 

                <telerik:RadGridView.Columns>

                    <telerik:GridViewColumn Width="30"

                                            CellTemplate="{StaticResource EditButtonColumnResource}">

                    </telerik:GridViewColumn>

                    <telerik:GridViewDataColumn Width="70"

                                                DataMemberBinding="{Binding Dept, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                                                IsSortable="True"

                                                CellTemplate="{StaticResource DeptResourceColumn}">

                        <telerik:GridViewDataColumn.Header>

                            <StackPanel>

                                <TextBlock Text="{Binding ApplicationStrings.DEPT, Source={StaticResource ResourceWrapper}}"

                                           Style="{StaticResource GridHeaderStyle}" />

                            </StackPanel>

                        </telerik:GridViewDataColumn.Header>

                    </telerik:GridViewDataColumn>

                    <telerik:GridViewDataColumn Width="134"

                                                DataMemberBinding="{Binding Fax, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                                                IsSortable="True"

                                                CellTemplate="{StaticResource FaxResourceColumn}">

                        <telerik:GridViewDataColumn.Header>

                            <StackPanel>

                                <TextBlock Text="{Binding ApplicationStrings.FAXNUMBER, Source={StaticResource ResourceWrapper}}"

                                           Style="{StaticResource GridHeaderStyle}" />

                            </StackPanel>

                        </telerik:GridViewDataColumn.Header>

                    </telerik:GridViewDataColumn>

                    <telerik:GridViewDataColumn Width="520"

                                                DataMemberBinding="{Binding Email, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                                                IsSortable="True"

                                                CellTemplate="{StaticResource EmailResourceColumn}">

                        <telerik:GridViewDataColumn.Header>

                            <StackPanel>

                                <TextBlock Text="{Binding ApplicationStrings.CONTACTEMAIL, Source={StaticResource ResourceWrapper}}"

                                           Style="{StaticResource GridHeaderStyle}" />

                            </StackPanel>

                        </telerik:GridViewDataColumn.Header>

                    </telerik:GridViewDataColumn>

                    <telerik:GridViewDataColumn Width="60"

                                                DataMemberBinding="{Binding Tier, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=True}"

                                                IsSortable="True"

                                                CellTemplate="{StaticResource TierResourceColumn}">

                        <telerik:GridViewDataColumn.Header>

                            <StackPanel>

                                <TextBlock Text="{Binding ApplicationStrings.TIER, Source={StaticResource ResourceWrapper}}"

                                           Style="{StaticResource GridHeaderStyle}" />

                            </StackPanel>

                        </telerik:GridViewDataColumn.Header>

                    </telerik:GridViewDataColumn>

                    <telerik:GridViewColumn Width="30"

                                            CellTemplate="{StaticResource CancelColumnResource}">

                    </telerik:GridViewColumn>

                    <telerik:GridViewColumn Width="30"

                                            CellTemplate="{StaticResource DeleteColoumnResource}">

                    </telerik:GridViewColumn>

                </telerik:RadGridView.Columns>

            </telerik:RadGridView>

        </Grid>

    </Grid>

</myViews:BaseUserControl>

 

 

Any help would be much appreciated; our company has used Telerik controls for all of our Silverlight projects and would like to continue using them for WPF once I have this figured out.

 

Pat

Mark
Top achievements
Rank 1
 answered on 17 Jan 2013
5 answers
167 views
I'm switching theme in runtime, as described here:
http://www.telerik.com/help/wpf/styling-apperance-themes-runtime.html

All controls pick up the theme changes, except my RadPanelBar. The reason seems to be this line in my XAML:

<telerik:RadPanelBar ItemContainerStyle="{StaticResource PanelBarItemFirstLevelStyle}" ...

<Style x:Key="PanelBarItemFirstLevelStyle" TargetType="telerik:RadPanelBarItem" BasedOn="{StaticResource RadPanelBarItemStyle}">
   <Setter Property="ItemContainerStyle" Value="{StaticResource PanelBarItemSecondLevelStyle}" />
</Style>

<Style x:Key="PanelBarItemSecondLevelStyle" TargetType="telerik:RadPanelBarItem" BasedOn="{StaticResource RadPanelBarItemStyle}"> ...


From what I can see, these styles are based on the currently loaded telerik styles. So why don't they pick up the theme change?
Tina Stancheva
Telerik team
 answered on 17 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?