Telerik Forums
UI for WPF Forum
3 answers
1.2K+ views
I've adapted the ContextMenu sample from the sample application where you can set the Visibility for each Column of a RadGridView for my application.
Now it would be nice if the ContextMenu stays open and the user can set the Visiblity of all columns without having to right-click on the header for each single column he wants to show or hide and if the ContextMenu closes when you click outside of it.

Is there a way to do that with RadContextMenu?

Thx

Polya
Telerik team
 answered on 01 Feb 2016
1 answer
829 views
I need to unsubscribe these events

 1. EventManager.RegisterClassHandler(typeof(RadTreeViewItem), Mouse.MouseDownEvent, new MouseButtonEventHandler(OnTreeViewItemMouseDown), false);
2. RegisterClassHandler(typeof(RadTreeView), RadDragAndDropManager.DragInfoEvent, new EventHandler<DragDropEventArgs>(OnTreeViewDragInfo), false);
3. RegisterClassHandler(typeof(RadTreeView), RadDragAndDropManager.DropQueryEvent, new EventHandler<DragDropQueryEventArgs>(OnTreeViewDropQuery), true);
Martin Ivanov
Telerik team
 answered on 01 Feb 2016
1 answer
196 views
I've looked around and can't really figure out how to do this. Anyone have any ideas? I just want to change the gear looking image to something like a label. Is this possible?
Masha
Telerik team
 answered on 01 Feb 2016
2 answers
192 views

I have applied an editable radtabitem header as the following

 I can see the editable TextBox set the the initial value for the header I can change it , but the Header Property it self still the same , so please what is wrong here?

 

<Style TargetType="{x:Type socialtracker:EditableTabHeaderControl}">
               <Setter Property="Template">
                   <Setter.Value>
                       <ControlTemplate TargetType="{x:Type socialtracker:EditableTabHeaderControl}">
                           <Grid>
                               <Grid.Triggers>
                                   <EventTrigger RoutedEvent="Grid.DragEnter">
                                       <BeginStoryboard x:Name="GridBeginStoryboard">
                                           <Storyboard>
                                               <DoubleAnimation Storyboard.TargetName="ButtonTransform" Storyboard.TargetProperty="ScaleX" Duration="0:0:0.5" From="1" To="1.1"/>
                                               <DoubleAnimation Storyboard.TargetName="ButtonTransform" Storyboard.TargetProperty="ScaleY" Duration="0:0:0.5" From="1" To="1.1"/>
                                           </Storyboard>
                                       </BeginStoryboard>
                                   </EventTrigger>
                                   <EventTrigger RoutedEvent="Grid.DragLeave">
                                       <StopStoryboard BeginStoryboardName="GridBeginStoryboard"/>
                                   </EventTrigger>
                                   <EventTrigger RoutedEvent="Grid.Drop">
                                       <StopStoryboard BeginStoryboardName="GridBeginStoryboard"/>
                                   </EventTrigger>
                               </Grid.Triggers>
                               <TextBox x:Name="PART_EditArea"
                           Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content, Mode=TwoWay}"
                           Visibility="Collapsed" />
                               <ContentPresenter x:Name="ContentPresenter"
                           Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content, Mode=TwoWay}" />
                           </Grid>
                           <ControlTemplate.Triggers>
                               <Trigger Property="IsInEditMode" Value="True">
                                   <Trigger.Setters>
                                       <Setter TargetName="PART_EditArea" Property="Visibility" Value="Visible" />
                                       <Setter TargetName="ContentPresenter" Property="Visibility" Value="Collapsed" />
                                   </Trigger.Setters>
                               </Trigger>
                           </ControlTemplate.Triggers>
                       </ControlTemplate>
                   </Setter.Value>
               </Setter>
           </Style>

Binding binding = new Binding
                   {
                       Path = new PropertyPath("."),
                       Mode = BindingMode.TwoWay,
                   };
 
                   var editableTabHeaderControl = new FrameworkElementFactory(typeof(EditableTabHeaderControl));
                   editableTabHeaderControl.SetBinding(EditableTabHeaderControl.ContentProperty, binding);
                   DataTemplate newDataTemplate = new DataTemplate() { VisualTree = editableTabHeaderControl, };                   
                    
                   RadTabItem item = new RadTabItem
                   {
                       Tag = new ObservableCollection<Tweet>(),
                       Name = "SelectedPrint" + _intSelectedPrintTabsCount.ToString(),
                       Header = " New Tab " + _intSelectedPrintTabsCount.ToString(),
                       HeaderTemplate =  newDataTemplate 
                                             
                   };
                    
                   tbSearchAndFOllow.Items.Insert(tbSearchAndFOllow.Items.Count - 1, (item));

Omar
Top achievements
Rank 1
 answered on 31 Jan 2016
1 answer
257 views

Hello,

I have added a footer to my gridview using the SumFunction. The content of all regular cells is aligned right (numeric values) but I cannot change the alignment of the result in the footer. Everything placed in the footer is rendered with minimal width and ignoring the width of the column, therefor all alignment settings are ignored.

 Any advices how to align the content in the footer?

 Thanks in advance.

Stefan Nenchev
Telerik team
 answered on 29 Jan 2016
1 answer
115 views

I am trying to create dynamic columns by creating column header and assigning the list of string values based on the index to the column databinding and while i am trying to add aggregation to the columns i am facing runtime issue as mentioned below.

"No generic method 'Sum' on type 'System.Linq.Enumerable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic."

I am unable to resolve this issue after number of workarounds.

 Kindly provide me a solution ASAP.

Regards,

Karthikeyan R

Stefan Nenchev
Telerik team
 answered on 29 Jan 2016
1 answer
135 views

Hi *,

I try to use the selection changed Event for the cartesian Chart to notify another view.

It works fine but I recognized that there is no possibility to select an item with the null value (see attached Picture).

 

Any ideas?

Thx

Rostislaw

Petar Marchev
Telerik team
 answered on 29 Jan 2016
1 answer
345 views

I have a radlistbox which has images, title and createddate of them. I showed images and title but i don't know what this listbox sort by. How can i sort listbox by createddate?

Something likes 

                                <telerik:RadGridView.SortDescriptors>
                                    <telerik:SortDescriptor Member="DateCreate" SortDirection="Ascending" />
                                </telerik:RadGridView.SortDescriptors>

of gridview.

Such as 'example.png', ListBox shows image and title, I want it to sort by created date.

 

Nasko
Telerik team
 answered on 29 Jan 2016
2 answers
131 views

Hi,

I have simple diagram (container and three items inside) as you can see on before.jpg.

When select container shape and quick drag in other place, connection change as you can see on after.jpg

This is really disturbing, beacuse in diagram with many elements inside container dragging makes it looks unreadable. Connections are arranged senselessly, not the same as user create them but random.

 

Any ideas?

Jakub
Top achievements
Rank 1
Iron
 answered on 29 Jan 2016
1 answer
189 views

I use the SDK sample - "Custoizing item" to change the item color

but when I try to get SelectedItem. it  always be null. it seems it can not be selected

ItemTemplateSelector="{StaticResource ItemTemplateSelector}"

 <local:CustomItemTemplateSelector x:Key="ItemTemplateSelector"
InstantItemTemplate="{StaticResource InstantItemTemplate}"
ItemWithDurationTemplate="{StaticResource ItemWithDurationTemplate}"/>
    

-Jacky

Martin Ivanov
Telerik team
 answered on 29 Jan 2016
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?