Telerik Forums
UI for WPF Forum
9 answers
239 views
HI
I am using blend 4 to modify one of the xaml page and it strangely not recognize window7 theme and it works perfectly in vs2010]


here goes the stacktrace
ArgumentException 'Windows7' is not a valid value for the 'Telerik.windows.controls.stylemanager.Theme property

thanks
Dani
Telerik team
 answered on 19 May 2011
0 answers
98 views
I want to know how to capture the Mouse Hover on a particular cell. I am s\using MVVM pattern for my development.
Nikhil Jain
Top achievements
Rank 1
 asked on 19 May 2011
1 answer
558 views
Is there a way to use the masked input to force proper email address formatting?
something along the lines of Mask="a25\@a25.LLL" or even better Mask="A3a25\@A3a25.L3"
I'd like it so that when the user types an '@' it skips the rest of the email prefix characters.
Same thing when they type the '.'
Can anyone think of a simple way to do this where I don't have to check the characters pressed in the code behind. That just seems like it wouldn't be a very cost efficient trasaction.

Eric
Alex Fidanov
Telerik team
 answered on 19 May 2011
1 answer
98 views
Is there a way to define the field layout (Grid.Row, Grid.Column) when handling the AutoGeneratingField  Event in C# ?

When Auto Generating the DataForm fields, it seems as though one cannot define the field sequence or position (only one column of fields is generated).

Pavel Pavlov
Telerik team
 answered on 19 May 2011
1 answer
102 views
I have created a custom control by deriving a class from the RadMaskedNumericInput control. It works fine until I create a resource style for it. Once the style exists, the control is no longer visible when running the app. When I tab, I can still give it focus, but it is not visible. It is visible when on a page in Visual Studio designer. I am working in WPF. The problem does not occur when wrapping the RadDatePicker.

Here is the derived class:

public class ccNumericTextBox : RadMaskedNumericInput

 

{

 

 

 

 

  public ccNumericTextBox()

 

  {

  }

 

 

 

 

 

 

 

  public override void EndInit()

  {

 

    base.EndInit();

 

  }

 

 

  protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)

  {

    this.SelectAll();

 

    base.OnGotKeyboardFocus(e);

 

  }

 

}

Here is the XAML:

<cc:ccNumericTextBox x:Name="txtDuration" Padding="2" Mask="#3.1" Height="22" Value="{Binding Path=Hours, Mode=TwoWay}"/>

 

 

 

Here is the Style:
<Style TargetType="{x:Type cc:ccNumericTextBox}">

   <Setter Property="Margin" Value="3,3,3,3"/>

 

</Style>

 

Alex Fidanov
Telerik team
 answered on 19 May 2011
3 answers
198 views
Hi,
I was stuck at a point where I need to assign a shortcut key which is stored in the database respective to a menu.
When I fetch the data the for the menu, I fetch all the details related to it, in a hierarchical manner and bind it to RadMenu DataSource.
Now my requirement is to assign the shortcut key to each RadMenuItem in the RadMenu, for this I thought of creating a CustomCommand using RoutedCommand, CommandBinding and KeyGesture. With this will create a MenuRoutedCommand and thus create a Command that will be assigned to each RadMenuItems command property.

But when i found the RadMenu items in loaded event, those items are not the RadMenuItem but the collection of Hierarchical object used to create the item. So, not able to assign Command as I was unable to get the RadMenuItem.

Please let me know how to assign Command in HierarchicalData source.

Or If there is anyother approach to assign shortcut keys dynamically to the RadMenuItem.

Please reply to it as soon as possible.

Thanks.
 
Hristo
Telerik team
 answered on 19 May 2011
1 answer
49 views
I am getting the following sorting error in several grids with different bindings when trying to sort. The data shows up correctly but I get an error when I try to sort:
'SystemFindingSystemModifierTypeEntityCollection' type does not have property named 'SystemModifierType_.Name', so cannot sort data collection.

I am using LLBLGen as my ORM and here is an example of a GridViewDataColumn I am using:

<

 

 

telerik:GridViewDataColumn Header="Modifier Type" DataType="{x:Type System:String}" Width="*" DataMemberBinding="{Binding SystemModifierType_.Name}" />

 

Vlad
Telerik team
 answered on 19 May 2011
1 answer
84 views
Can someone provide any example to use ExpressionColumn with MVVM?

I have a GridView Itemsource binded to a collection of clients. Only on the grid i need to show a column to calculate 2 values, but i only find examples puting business logic on view, nothing using mvvm.
Vlad
Telerik team
 answered on 19 May 2011
4 answers
108 views

Hello Telerik,

We use a ResourceFIle for all displayed text in our application in order to support Globalization.  This works great for the GridViewDataColumn.Header unless it is in a child GridView. 

In the example below, we were forced to use a custom header in in the RowDetailsTemplate in order for the Header to Display correctly.  If we set the Header property in _gridDetails like in _gridPing it does not work. There were no binding errors, but the Header text was the displaying the binding property name, not the ResourceFile property value.

Is this a known issue?  I would like to use the simpler syntax if possible.


Thank you,
-Mark

<datagrid:NstrumentDataGrid x:Name="_gridPing"  Grid.Row="1" ItemsSource="{Binding Responses}"  >
    <datagrid:NstrumentDataGrid.Columns>
        <telerik:GridViewToggleRowDetailsColumn />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Address}" Width="150" DataMemberBinding="{Binding Path=Address}" />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Bytes}" Width="75" DataMemberBinding="{Binding Path=BufferLength}"/>
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Sent}" Width="75" DataMemberBinding="{Binding Path=Sent}"/>
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Received}" Width="90" DataMemberBinding="{Binding Path=Received}"/>
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.PercentLost}" Width="75" DataMemberBinding="{Binding Path=PercentLost}" />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Min}" Width="75" DataMemberBinding="{Binding Path=Min}" />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Avg}" Width="75" DataMemberBinding="{Binding Path=Avg}" />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Max}" Width="75" DataMemberBinding="{Binding Path=Max}" />
    </datagrid:NstrumentDataGrid.Columns>
    <datagrid:NstrumentDataGrid.RowDetailsTemplate>
        <DataTemplate >
            <datagrid:NstrumentDataGrid x:Name="_gridDetail" ItemsSource="{Binding Responses}" Margin="25,0,0,0" BorderThickness="0" >
                <datagrid:NstrumentDataGrid.Columns>
                    <telerik:GridViewDataColumn Width="125" DataMemberBinding="{Binding Path=Status}" >
                        <telerik:GridViewDataColumn.Header>
                            <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Status}"/>
                        </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="125" DataMemberBinding="{Binding Path=RoundTripTime}" >
                        <telerik:GridViewDataColumn.Header>
                            <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.RTT}"/>
                        </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="125" DataMemberBinding="{Binding Path=BufferLength}" >
                        <telerik:GridViewDataColumn.Header>
                            <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.BufferLength}"/>
                        </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                </datagrid:NstrumentDataGrid.Columns>
            </datagrid:NstrumentDataGrid>
        </DataTemplate>
    </datagrid:NstrumentDataGrid.RowDetailsTemplate>
    <telerik:RadContextMenu.ContextMenu >
        <telerik:RadContextMenu x:Name="_contextMenu"  Opened="RadContextMenu_Opened"/>
    </telerik:RadContextMenu.ContextMenu>
</datagrid:NstrumentDataGrid>
mark
Top achievements
Rank 1
 answered on 18 May 2011
3 answers
141 views
Do the Telerik controls work with Visual State Manager?  I am using 2010.1.309.35 right now, and specifically I am working on the GridViewRow.  I notice that the template doesn't automatically show states in Blend, but didn't expect it to either.  But it appears that I cannot create these states either like I can on standard MS WPF 3.5 controls.  For example, I created a VisualStateGroup named CommonStates and added the states Normal and MouseOver.  I really prefer working with VSM as opposed to triggers and wondered if someone from Telerik could address VSM support in Telerik controls.

Thanks,
David
Kalin Milanov
Telerik team
 answered on 18 May 2011
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?