Telerik Forums
UI for WPF Forum
8 answers
486 views
Hi 

I am trying to implement a RadContextMenu and am not seeming to be able to get the DisplayMemberPath to work

The following code does not display the correct label on the menuitem ( the menu items do display)

<telerik:RadButton cal:Message.Attach="Show" BorderBrush="{x:Null}" Background="{x:Null}"
                        Foreground="Black" FontFamily="Arial" Margin="1,3">
                     <Grid>
                         <telerik:RadContextMenu.ContextMenu>
                             <telerik:RadContextMenu  ItemsSource="{Binding Items}"
Placement="Right" DisplayMemberPath="DisplayName"   / >
                         
                         </telerik:RadContextMenu.ContextMenu>
                         
                         <TextBlock VerticalAlignment="Top"
                                     Foreground="Red"
                                     HorizontalAlignment="Right"
                                     Margin="2"
                                     Text="{Binding Status}" />
 
         <StackPanel>
 
                            
                             <Image Source="{Binding Icon}" HorizontalAlignment="Center" VerticalAlignment="Center" />
           <TextBlock Text="{Binding IconName}" Foreground="White" HorizontalAlignment="Center" />
 
         </StackPanel>
                     
                     </Grid>
  
     </telerik:RadButton>

But this code does

<telerik:RadContextMenu.ContextMenu>
                                    <telerik:RadContextMenu  ItemsSource="{Binding Items}" Placement="Right" DisplayMemberPath="DisplayName"    >
                                        <telerik:RadContextMenu.ItemTemplate>
                                            <DataTemplate>
                                              
                                                <TextBlock Text="{Binding DisplayName}"  />                                
                                            </DataTemplate>                            
                                        </telerik:RadContextMenu.ItemTemplate>
                                                                             
                                    </telerik:RadContextMenu>
                                </telerik:RadContextMenu.ContextMenu>


I don't want to use the second code I would like to use DisplayMemberPath.  I also tried setting ToString() on the buisness object as stated in the documenation (http://www.telerik.com/help/wpf/radcontextmenu-populating-with-data-data-binding-support-overview.html ) But this did not work either.

Does anyone have any idea why this isn't working?

thanks

Murray


Murray
Top achievements
Rank 1
 answered on 30 May 2012
2 answers
204 views
I would like my application GUI to be able to scale with the amount of screen estate available. Using a TileView, seems like the only options to control the column width are:
  1. set ColumnsCount of the TileView, which will cause the tile to resize as the view resizes
  2. set ColumnWidth, which gives each column a fixed width regardless of the size of the view, number of column would change according to the view width.

I quite like the second method, except that it leaves a rather ugly empty void on one side of the TileView.

Is there an option to either:
  • Cause the tile to stretch similar to when ColumnsCount is set? maybe with a MinimumColumnWidth property... For example, if MinimumColumnWidth=300 and the TileView width is 1100, each of the 3 columns will have the width of 366, and when the TileView has a width of 1200, one more column will appear with width of 300 each.
  • Evenly space the columns across the whole width of the TileView?

Wenrong
Top achievements
Rank 1
 answered on 30 May 2012
5 answers
309 views
Hi!

I'm currently working on a project and I need to ScaleTransform the SelectedItem
I've tried diffrent ways, but no ways seems to be.

What i want is the Image/CarouselItem/SelectedItem to Scale when i trigger StoryBoard begin.

Like a ZoomIn/ZoomOut on the SelectedItem.

Is this possible to do?

TransformGroup transformGroup = (TransformGroup)SelectedItem.RenderTransform;
 ScaleTransform transform = (ScaleTransform)transformGroup.Children[0];
 
  xAni = new DoubleAnimation();
 
            xAni.Duration = TimeSpan.FromMilliseconds(300);
            xAni.From = xFrom;
            xAni.To = xTo;
            storyboard.Children.Add(xAni);
 
            // if (yAni == null)
            yAni = new DoubleAnimation();
 
            yAni.Duration = TimeSpan.FromMilliseconds(300);
            yAni.From = yFrom;
            yAni.To = yTo;
            storyboard.Children.Add(yAni);
 
            Storyboard.SetTargetProperty(xAni, new PropertyPath("(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"));
            Storyboard.SetTarget(xAni, SelectedItem);
 
            Storyboard.SetTargetProperty(yAni, new PropertyPath("(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"));
            Storyboard.SetTarget(yAni, SelectedItem);
 
 storyboard.Begin();


<telerik:RadCarousel                                       
                                      x:Name="Part_RadCarousel"
                                       AutoGenerateDataPresenters="False"
                                       HorizontalAlignment="Stretch"
                                       VerticalAlignment="Stretch"
                                       Background="Black"
                                       VirtualizingStackPanel.IsVirtualizing="True">
                           <telerik:RadCarousel.ItemTemplate>
                               <ItemContainerTemplate>
                                   <Image  HorizontalAlignment="Stretch"
                                               VerticalAlignment="Stretch"
                                               Margin="25"
                                               Height="600"
                                               Width="800"
                                               RenderTransformOrigin="0.5,0.5"
                                               Source="{Binding ImageUrl}">
                                       <Image.RenderTransform>
                                           <TransformGroup>
                                               <ScaleTransform ScaleX="1" ScaleY="1"/>
                                           </TransformGroup>
                                       </Image.RenderTransform>
                                   </Image>
                               </ItemContainerTemplate>
                           </telerik:RadCarousel.ItemTemplate>
                           <telerik:RadCarousel.ItemsPanel>
                               <ItemsPanelTemplate>
                                   <telerik:RadCarouselPanel  Path="{StaticResource path}"
                                                              IsContinuous="True"
                                                              IsScalingEnabled="True"
                                                              />
                               </ItemsPanelTemplate>
                           </telerik:RadCarousel.ItemsPanel>
                       </telerik:RadCarousel>

Regards
Joachim
Lancelot
Top achievements
Rank 1
 answered on 29 May 2012
2 answers
313 views
Ok, I give up. How do you change the theme for this control? Assuming there is built in themes for this that is. I've been all over the documentation and the example but no where can I see how this is done. The WPF example that ships with the controls shows about 8 themes.... How do I use it? The default theme appears to be Office black. I'd like to change it to office blue.

Thanks in advance.
John DeGrey
Top achievements
Rank 1
 answered on 29 May 2012
1 answer
120 views
Hi,

Is it possible to copy protection ranges from one document to another?

For example, I have a Paragraph in a Protected Document that is editable because of the current user that is logged in (user: editor):
<t:Paragraph StyleName="styleParagraphEditableGroup">
      <t:PermissionRangeStart AnnotationID="6">
        <t:PermissionRangeInfo Name="editor" Type="Individual" />
      </t:PermissionRangeStart>
      <t:Span Text="Editable Region Here!" />
      <t:PermissionRangeEnd AnnotationID="6" />
    </t:Paragraph>

Is it possible to copy and paste the Permission ranges into a new document? In my instance I can guarantee that the new document has the same Protection settings and users as the document that the content is being copied from.

Essentially my document has two types of permission ranges. Headers which no one can edit (i,e, they are assigned a User who doesn't really exist) and EditableGroups that can be edited by users logged in by the name editor (editors are always logged in, thus the EditableGroup regions can always be edited). 

Thanks for your time,

Rob
Iva Toteva
Telerik team
 answered on 29 May 2012
1 answer
85 views
Hi,

Could you confirm that there is a bug in the build 'RadControls for WPF 2012 1 0514 Dev hotfix' that means the SelectedColorChanged event is not firing on the RadColorPicker when the color is changed?

Regards,
Chris
Petar Mladenov
Telerik team
 answered on 29 May 2012
1 answer
254 views
How do I inject a RadSplitContainer to my main docking manager (telerik:RadDocking). Currently I'm doing the following.

I am using the ninject DI framework.

I have the following code in my main main window.

<telerik:RadDocking x:Name="mainDockingManager" Grid.Row="1" Grid.Column="0">
<telerik:RadDocking.DocumentHost>
<telerik:RadSplitContainer><telerik:RadPaneGroup>
<telerik:RadDocumentPane>Stuff here</telerik:RadDocumentPane>
</telerik:RadPaneGroup>
</telerik:RadSplitContainer>
</telerik:RadDocking.DocumentHost><br></telerik:RadDocking>

In the constructor I initialise the DI framework and inject the ILegend usercontrol into the docking manager.

 
InitializeComponent();
kernel =
new StandardKernel(new AppModule());
this.mainDockingManager.Items.Add(kernel.Get<ILegend>());


The ILegend UserControl is just a wrapper around a <telerik:RadSplitContainer> i.e.:

<UserControl x:Class="Whiteboard.Plugin.UI.UnclassLegend"<br>
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"<br>
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"<br>
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" <br>
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"<br>
             xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking"<br>
             mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"><br>
    <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="170,500" InitialPosition="DockedLeft">


This method doesn't seem to be working, is it possible to inject different implementations of a RadSplitContainer containing different content?
Miroslav Nedyalkov
Telerik team
 answered on 29 May 2012
1 answer
216 views
Hi,

i'm using the Listbox Drag & Drop example as base of my ListBox. I use also a ItemTEmplate + DataTemplate. But how do i add my own TooltipTemplate to the ListboxItems?

i found an example for a tooltip template:

<Style x:Key="{x:Type ToolTip}" TargetType="ToolTip">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="HasDropShadow" Value="True"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ToolTip">
                        <Border CornerRadius="7" HorizontalAlignment="Center" VerticalAlignment="Top" Padding="5" BorderThickness="3,3,3,3">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#CF181818" Offset="0"/>
                                    <GradientStop Color="#BE1C1C1C" Offset="1"/>
                                </LinearGradientBrush>
                            </Border.Background>
                            <Border.BorderBrush>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#80FFFFFF" Offset="0"/>
                                    <GradientStop Color="#7FFFFFFF" Offset="1"/>
                                    <GradientStop Color="#FFFFF18D" Offset="0.344"/>
                                    <GradientStop Color="#FFFFF4AB" Offset="0.647"/>
                                </LinearGradientBrush>
                            </Border.BorderBrush>
                            <StackPanel>
                                <TextBlock FontFamily="Tahoma" FontSize="11" Text="{Binding Name}" Foreground="#FFFFFFFF" />
                            </StackPanel>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

But how bin this Template to my DataItems?

thanks
regards
rene
George
Telerik team
 answered on 29 May 2012
2 answers
111 views
Hi
when i put Rad Window in a Maximized state, I can't well be closed or minimized
because the mouse pointer must be placed in the upper button 


Mojtaba Madadkhani
Top achievements
Rank 1
 answered on 29 May 2012
1 answer
85 views
At present I am using Telerik assemblies 2012.1.507.40 but my teammate when logged into the product download page can only see 2012.1.326 (Mar 26, 2012).

What would be the best course of action to download the full msi for 2012.1.507.40?

Thank you,
Tina Stancheva
Telerik team
 answered on 29 May 2012
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?