Telerik Forums
UI for WPF Forum
1 answer
228 views
Hi There,

I have a requirement where i have to display a small image at left side of contentpresenter on every header of control. for this at present i have to add a below xaml to every controls template,

<ControlTemplate TargetType="ContentControl"
                   x:Key="Sample">
      <StackPanel Orientation="Horizontal">
          <mage x:Name="Symbol"
                         Template="{Binding
                                                          Path=(prop:VResultType),
                                                          RelativeSource={RelativeSource TemplatedParent},
                                                          Converter={StaticResource vSymbolConverter}}"
                         Margin="0,0,5,0"
                         Visibility="Collapsed"
                         Height="16"
                         Width="16">
 
              <ToolTipService.ToolTip>
                  <ToolTip Placement="Bottom"
                           Content="{Binding
                                                      Path=(prop:ResultIndicator.ResultToolTip),
                                                      RelativeSource={RelativeSource TemplatedParent}}" />
              </ToolTipService.ToolTip>
          </uxc:XamlImage>
          <ContentPresenter x:Name="Content"
                            ContentSource="Header"
                            RecognizesAccessKey="True"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                            Height="Auto"
                            Width="Auto"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Visibility="Visible" />
      </StackPanel>
  </ControlTemplate>


but there will be a huge maintenance. i want to place this in one place may be i can create a template for contentpresenter and i can use the style key. 


If you have any better solution please guide me.

Thanks in Advance,
Srinivas.
.
Vanya Pavlova
Telerik team
 answered on 12 Jun 2013
1 answer
453 views
Hi,

We are sorting our columns only during Grid load and are using XAML to sort the Grid (see below). We have disabled runtime column sorting. But we don't want to show Sort indicator as this is not looking nice on UI (please see UI snapshot).

XAML Snippet:-

ColumnDefinition:-

 

<telerik:GridViewDataColumn Header="Ccy" DataMemberBinding="{Binding CurrencyBucket}" Width="50"

 

ColumnGroupName="Filler2" />

SortDescription:-

 

<telerik:ColumnSortDescriptor Column="{Binding Columns[\CurrencyBucket\], ElementName=CcySummaryGrid}"

 SortDirection="Ascending" />

 

 

 

Maya
Telerik team
 answered on 12 Jun 2013
2 answers
110 views
Is there any way to change the default behavior of the left mouse button when clicking on an empty area of a diagram?
By default it creates a selection rectangle but I would prefer if it defaulted to drag mode (the same as when you Ctrl-Left click).

Is this possible?
Jason
Top achievements
Rank 1
 answered on 12 Jun 2013
1 answer
258 views
Hi,

We are using Caliburn.Micro for MVVM Pattern, How to use Save & Load settings in ViewModel without written in code behind.

Thanks.
Zarko
Telerik team
 answered on 11 Jun 2013
4 answers
111 views
I have followed the following example to make a Header editable in the RadPane for the end user.
http://www.telerik.com/help/silverlight/radtabcontrol-how-to-make-the-tab-headers-editable.html

I am having difficulty setting focus to the TextBox in the EditableContentControl.  The end requiremetn is to select all the text when the users double clicks the header text.  I was hoping this would be as simple as calling SelectAll and Focus on the TextBox when the mode is set for edit but focus is not in that control.  Snoop shows that the mouse event was handled and just for a long shot I removed the e.Handled = true just as a test. 

Within the RadPane I have a GridView and I can see the rows changing color as I mouse over them.  I am aware of the difference between keyboard and logical focus but I simply cannot get focus regardless of what I do, including directly using the FocusManager.

Can you provide some assistance?

Thank you

Paul
Paul
Top achievements
Rank 1
 answered on 11 Jun 2013
2 answers
77 views
Hi all,

I'm trying to follow the example for creating a context menu in my GridView in order to be able to show and hide columns based on
the users wishes. I've downloaded the example 164083_headercontextmenu.zip from this forum, in this thread: http://www.telerik.com/community/forums/wpf/gridview/use-context-menu-to-show-and-hide-columns.aspx

However, trying to accomplish this I run into the following error:
The type or namespace name 'HeaderMenu' does not exist in the namespace 'Telerik.Windows.Controls.GridView' (are you missing an assembly reference?)

Is it gone, or have I done something wrong??

Best Regards
Johannes
Johannes
Top achievements
Rank 1
 answered on 11 Jun 2013
0 answers
156 views
Hi,

I'm developing a library based on Microsoft's UI Automation Framework which allows creating automated tests involving the GridView control.

One of the main features of this library relating to this control is, of course, the ability to fetch all rows currently displayed in the grid. I do this by accessing the GridView's AutomationElement object in the UI tree, and then fetch all descendants that are of the GridViewRow class.

The problem is that the GridView in question is virtualized, hence the code described above only fetches a small part of the grid's content (the one that's currently visible).

Microsoft's suggestion of dealing with this problem is using the ItemContainer pattern, that exposes a method that allows to find all elements given a certain condition, regardless of whether or not they're virtualized, and then use the VirtualizedItem pattern's Realize() method in order to bring the item into view.

The problem I have with this is twofold: one, I couldn't find any AutomationElement that supports the ItemContainer pattern (not the GridView itself, and none of the custom elements under it). Two, even if I did, in order to construct a condition for the ItemContainer to work on, I need each row to have a unique identifier, and this is not the case. Even the RuntimeId property which is supposed to be unique gets recycled as you scroll down.

I can solve this problem by scrolling through the grid and fetching all unique elements, but clearly this is not the best solution, especially given the VirtualizedItem pattern intended exactly for this purpose.

I would love to hear the experts on this!

Tal
Tal
Top achievements
Rank 1
 asked on 11 Jun 2013
1 answer
86 views
Hi,

I'm using the Telerik's Docking control to create an advance UI, but I'm having some problems to achieve a neccesary behaviour with the RadPanes.

I have a main RadDocking control that contains three main RadPanes in one RadPaneGroup. Also, each of these three RadPanes contains another two RadPane, but... I want to these new two RadPanes move and dock in the context of the parent RadPane only.

Example:
- RadDocking
  -- RadPane main1
    -- RadPane child1
    -- RadPane child2
  -- RadPane main2
  -- RadPane main3

RadPane main1, RadPane main2 and RadPane main3 can move, dock and change the positions between them as usual.
RadPane child1 and RadPane child2 can move, dock and change the positions between them, but cannot move in a context out of RadPane main1. Also, if you move RadPane main1, the RadPane child1 and RadPane child2 will be move with RadPane main1 as like as a usual content.

Currently, all RadPanes (main and childs) can move and dock to any place in the windows. I do not want this.

I thought that creating a new RadDocking into RadPane main1 will solve this, but RadDockings in RadDocking is not allowed.


On the other hand, I know that in WinForms using ToolTabStrip this behaviour is possible, but I do not know how to do in WPF.
Vladi
Telerik team
 answered on 11 Jun 2013
1 answer
118 views
Hi Telerik,

I'm glad to see you're including a point series in your next release. At the moment I'm simulating a point series by styling a LineSeries, and making the stroke transparent. I then use a PointTemplate to make the point, as below.

My question is how can I bind the fill brush of the ellipse I'm using to the palette colour for the series?

thanks

 <Style x:Key="LineSeriesAsPointsStyle" TargetType="{x:Type telerik:LineSeries}">
    <Setter Property="StrokeShapeStyle">
    <Setter.Value>
    <Style TargetType="{x:Type Path}">
    <Setter Property="Stroke" Value="#00000000"/>
    <Setter Property="StrokeThickness" Value="0"/>
    </Style>
    </Setter.Value>
    </Setter>
<Setter Property="PointTemplate">
<Setter.Value>
<DataTemplate>
<Ellipse Height="7" Width="7" Fill="Red" /><!-- here is the problem -->
</DataTemplate>
</Setter.Value>
</Setter>
    </Style>
Petar Kirov
Telerik team
 answered on 11 Jun 2013
3 answers
319 views

Is there any way to plot negative values in Pie chart like we can do in Microsoft Excel.

Below are snap shots of two charts having negative values one plotted using telerik chart and another using Excel.

Evgenia
Telerik team
 answered on 11 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?