Telerik Forums
UI for WPF Forum
26 answers
598 views
I have a parent grid which has a child RadGridView in the HierarchyChildTemplate. And i have the same columns for both parent and children rows. I want to apply all the operations that are done on the parent to be propagated to children, like when i resize the parent column i want the corresponding column in child also to be resized and when i reorder the column of the parent, i want the children columns also to be reordered and when i move the FrozenColumns bar to some columns in parent, i want the child grid also to Freeze the same number of columns etc. In short, i want the control to behave the same way as RadTreeListView for hierarchy. I found that i can use events ColumnWidthChanged, ColumnReordered for resize and reorder, but i didn't find any event for change of FrozenColumns. 

And do i need to rewrite all my triggers and behaviors present on the parent Grid in the Child Grid to apply on the child? Or is there any way to propagate all the operations done on parent columns automatically to children? If no, do you have a sample template to propagate all the changes made on the parent columns to the child grid?
Vanya Pavlova
Telerik team
 answered on 14 Oct 2014
2 answers
128 views
Hi,

I'm trying to add a contextual menu to a MapPathView and I encountered some problems.

Here's what I have :

DataTemplate:
                    <DataTemplate x:Key="ZoneTemplate" DataType="ZoneViewModel">
                        <telerik:MapPathView>
                            <telerik:MapPathView.Data>
                                <.../>
                            </telerik:MapPathView.Data>
                            <telerik:RadContextMenu.ContextMenu>
                                <telerik:RadContextMenu>
                                    <telerik:RadMenuItem Header="Remove" Command="{Binding DataContext.RemoveZoneCommand, Source={x:Reference parentControl}}" CommandParameter="{Binding}"/>
                                </telerik:RadContextMenu>
                            </telerik:RadContextMenu.ContextMenu>
                        </telerik:MapPathView>
                    </DataTemplate>

VisualizationLayer:
                <telerik:VisualizationLayer UseDefaultPropertyAccessor="False" UseBitmapCache="False"
                                            ItemsSource="{Binding Path=CurrentZones}" ItemTemplate="{StaticResource ZoneTemplate}"
                                            MapShapeVisualizationCreated="OnVisualizationCreated" MapShapeVisualizationRemoved="OnVisualizationRemoved">
                    <telerik:VisualizationLayer.ShapeFill>
                        <telerik:MapShapeFill Fill="Blue" StrokeThickness="1" Stroke="Red" />
                    </telerik:VisualizationLayer.ShapeFill>
                </telerik:VisualizationLayer>

VisualizationCreatedEvent:
        private void OnVisualizationCreated(object sender, MapShapeOperationEventArgs e)
        {
            if (e.Visualization != null)
            {
                var dataContext = e.Data.Wrapper.DataContext as ZoneViewModel;
                if (dataContext != null)
                {
                    ...
                    var contextMenu = RadContextMenu.GetContextMenu(e.Data.Wrapper);
                    RadContextMenu.SetContextMenu(e.Visualization, contextMenu);
                    contextMenu.DataContext = dataContext;
                }
            }
        }

The contextual menu shows as expected, but the command parameter is not a ZoneViewModel as I expected, it's a PathData.
Do you have any idea of what is the problem ?

Thank you!

Etienne
Petar Mladenov
Telerik team
 answered on 14 Oct 2014
3 answers
811 views
Hi, 
I'm using a RadWindow as Mainwindow for my project.
I wanted to know if it is possible to send the window to fullscreen covering the window taskbar and occuping the all monitor area 

Thx in advance

Davide
Kalin
Telerik team
 answered on 14 Oct 2014
1 answer
172 views
I am using TElerik office blue theme.I need to change the radRibbonGroup Tray font color.For achieving this which property of Telerik.Windows.Controls.RibbonView.xaml  need to change.Please find the attachment.


Thanks in advance....
Arun
Martin Ivanov
Telerik team
 answered on 13 Oct 2014
1 answer
127 views
Hi

Is this any way we can achieve the below kind of scheduler in the RAD WPF tools.

subjects are in the list that can be drag-gable and drop-able in the below table.
Yana
Telerik team
 answered on 13 Oct 2014
1 answer
193 views
Hey,

We are trying to use RadPropertyGrid for a configurable application where we don't know the objects at design time. At runtime we are using PropertyDefinition for each field. This is working well except when we need to create a RadComboBox and assign the ItemsSource at runtime. This is the function to create the "Generic" DataTemplate and the only question we have is how to set the ItemsSource on the newly created RadComboBox (it is the codedValueDomain parameter).

Thanks,
Mano

private DataTemplate GetDataTemplate(Esri.ArcGISRuntime.Data.FieldInfo fieldInfo, CodedValueDomain codedValueDomain)
{
 
    StringBuilder stringBuilder = new StringBuilder();
    stringBuilder.Append("<DataTemplate ");
    stringBuilder.Append("xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' ");
    stringBuilder.Append("xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' ");
    stringBuilder.Append("xmlns:telerik='http://schemas.telerik.com/2008/xaml/presentation'>");
 
    if (codedValueDomain != null)
        stringBuilder.Append(string.Format(@"<telerik:RadComboBox Name=""comboBox"" SelectedValue=""{{Binding Attributes[{0}], Mode=TwoWay}}"" DisplayMemberPath=""Value"" SelectedValuePath=""Key"" HorizontalAlignment=""Stretch"" />", fieldInfo.Name));
    else if (fieldInfo.Type == FieldType.Integer || fieldInfo.Type == FieldType.Double || fieldInfo.Type == FieldType.SmallInteger || fieldInfo.Type == FieldType.Single)
        stringBuilder.Append(string.Format(@"<telerik:RadNumericUpDown Value=""{{Binding Attributes[{0}], Mode=TwoWay}}"" HorizontalAlignment=""Stretch""/>", fieldInfo.Name));
    else if (fieldInfo.Type == FieldType.Date)
        stringBuilder.Append(string.Format(@"<telerik:RadDateTimePicker SelectedValue=""{{Binding Attributes[{0}], Mode=TwoWay}}"" HorizontalAlignment=""Stretch"" InputMode=""DatePicker""/>", fieldInfo.Name));
    else
        stringBuilder.Append(string.Format(@"<telerik:RadMaskedTextInput Value=""{{Binding Attributes[{0}], Mode=TwoWay}}"" TextMode=""PlainText"" Mask="""" HorizontalAlignment=""Stretch""/>", fieldInfo.Name));
 
    stringBuilder.Append("</DataTemplate>");
 
    DataTemplate dataTemplate = System.Windows.Markup.XamlReader.Parse(stringBuilder.ToString()) as DataTemplate;
 
    return dataTemplate;
 
}
Dimitrina
Telerik team
 answered on 13 Oct 2014
1 answer
186 views
Hi there,

I'm using RadTimePicker inside RadDataFilter. My RadTimePicker is using TimeSpan data type and using SelectedTime property. When i change the time using the time picker control button and then i clicked on one of the time options, it works properly. However, if i change the time manually using the textbox of the radtimepicker, the PropertyChanged event will be called twice. First time it is called, the value is correct, but the second time, it will be an "UnSet" value. Is this a bug or is there some setting that must set to make it work properly.

Hope to hear from you soon.

Thank you
Kalin
Telerik team
 answered on 13 Oct 2014
1 answer
80 views
I have a list of customers, and each customer itself has a list of contacts. To check if either the customer or a contact contains a certain name I would do the following query (in Entity Framework and LINQ):

query.Where
        (cust => cust.Name.Contains(filter) ||
        cust.Contacts.Any(contact => contact.LastName.Contains(filter)));

Which means: look inside the customer.Name or every contact belonging to the customer and look inside contact.LastName if it contains the filter-string.

Big question: how can this be done by creating a (Composite-) FilterDescriptor so that a QueryableCollectionView gets filtered correctly? First part is easy, but the second part "cust.Contacts.Any(...)" makes me a headache.

Regards
Neils
Dimitrina
Telerik team
 answered on 13 Oct 2014
1 answer
149 views
the Code below is Bound to IsExpanded of RadTreeItem


public
bool IsExpanded
       {
           get
           {
               return isExpanded;
           }
           set
           {
               try
               {
                   if (isExpanded != value)
                   {
                       if (value)
                       {
                           if (Children.Contains(dummy))
                           {
                               Children.Remove(dummy);
                           }
                           LoadChildren();
                       }
                   }
                   isExpanded = value;
                   RaisePropertyChanged(() => IsExpanded);
               }
               catch (Exception e)
               {
                   if (!HasItems)
                   {
                       //if empty, add dummy to keep the expander.
                       Children.Add(dummy);
                   }
                   //any exception will keep this node collapsed.
                   isExpanded = false;
                   RaisePropertyChanged(() => IsExpanded);
                   throw;
               }
           }
       }


Inside the catch statement, I want to force collapse the treeitem if there is an error. If I put "throw" the tree item DOES NOT collapse. when I remove the "throw" it collapses successfully. Why "throw" is preventing the treeitem to collapse? 


We need the "throw" because IsExpanded is called by another method that catches the exception and do some logic.

 
Petar Mladenov
Telerik team
 answered on 13 Oct 2014
2 answers
96 views
I'm working on a WPF application and using the Telerik RadChart control.I'm having the following issue:

see demo2.JPG

The number is not displayed for the first and last columns/series.

When I have less columns, everything works great, as in the demo3.JPG

I'm not sure what causes that, and really hope to get any suggestions (maybe its a lack of space, but I'm not sure how to solve that). Thanks!
Dmitri
Top achievements
Rank 1
 answered on 12 Oct 2014
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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?