Telerik Forums
UI for WPF Forum
1 answer
278 views

Hi all

I am binding the 'IsSelectedProperty' to trigger actions when a RadDiagramShape is selected (Clicked).

I also need to handle when the Background of the Diagram is clicked.. I've tried the override '(Preview)OnMouseDown' functions, but these also get called when the shape is clicked. I want to distinguish the case where the background of the diagram is clicked only... not a shape. Any ideas what I should be using?

 

Thanks

Dinko | Tech Support Engineer
Telerik team
 answered on 24 Sep 2018
3 answers
85 views

I have found that when scrolling through up and down the years that I get incorrect values.  I have attached pictures of these values.  Obviously, when I select 1990 I expect to get years listed between 1990 and 2000 but I don't get that.

 

<telerik:RadDatePicker
    Grid.Row="4"
    Grid.Column="2"
    Margin="20,5,5,5"
    MaxHeight="60"
    IsEnabled="True"
    Background="{DynamicResource PrimaryBackgroundBrush}"
    Foreground="{DynamicResource PrimaryForegroundBrush}"
    SelectedDate="{Binding Patient.DOB, Mode=TwoWay}"
    DisplayDateStart="{Binding Patient.DOBDateStart}"
    DisplayDateEnd="{Binding Patient.DOBDateEnd}"
    SelectableDateStart="{Binding Patient.DOBDateStart}"
    SelectableDateEnd="{Binding Patient.DOBDateEnd}"
    DateTimeWatermarkContent="Enter Birth Date"
    ToolTip="{Binding [0].ErrorContent}">
</telerik:RadDatePicker>
Dilyan Traykov
Telerik team
 answered on 21 Sep 2018
1 answer
97 views

I have a touch based application that uses a large font (Segoe UI 28) .  I need to force the Year/Decade Panels to display correctly.  How do I prevent the host panel from collapsing when I pick a year (it goes from wide accommodating the entire calendar down to listing only the Years) and I need to guarantee it doesn't crowd the years into a very small place?

 

Dilyan Traykov
Telerik team
 answered on 21 Sep 2018
4 answers
325 views

Hi.
This company to develop its software production required a components for UI layer, which according to your company's records and resume Terelik, Trial version of it with real Database ourselves on a system specification and the results are listed below
is, we test.
Of course, we order your copy for WPF, WinForm & Ajax, but we consider all the tests did with WPF.
According to our results, the speed of loading and grouping based on columns in the grade products than other companies such as Janus DevleloperEXpress and was very low. So please, if possible solution for improving your present problem. 

Test System Properties:

CPU:                               Core2 2.2 Gh

RAM:                               1G

Platform:                                   WIN XP SP3

Programing Language:      .NET 3.5 C# 2008

 

Record Count and Results:

RowCount:                       65000

ColCount:                        10

ResultTime:                     8.5 s

 

Dinko | Tech Support Engineer
Telerik team
 answered on 21 Sep 2018
0 answers
84 views

Hi,

The ClassDiagram example defines the class shape inside <style> definition. I need now dynamically access one TextBlock inside the definition as I need to set the text according to user input. I'm having hard time to do this as following does not work:

private void NewClass_Click(object sender, Telerik.Windows.RadRoutedEventArgs e)
       {
           ClassShape newClass= new ClassShape() { Content = "Class1", Position = new Point(300, 120) };
           //newClass.ApplyTemplate();
           var textBlock = newClass.FindName("TypeName") as TextBlock;
 
           newClass.Loaded += this.OnNewClassLoaded;
           this.diagram.Items.Add(newClass);
       }

 

This is absolutely driving me crazy, so any help would be much appreciated.

 

The definition of ClassShape is something like:

<Window.Resources>
       <Style TargetType="local:ClassShape">
           <Setter Property="IsCollapsible" Value="True" />
           <Setter Property="IsResizingEnabled" Value="False" />
           <Setter Property="MinHeight" Value="100" />
           <Setter Property="MinWidth" Value="100" />
           <Setter Property="Padding" Value="15 5" />
           <Setter Property="Width" Value="150" />
           <Setter Property="Height" Value="Auto" />
           <Setter Property="HorizontalContentAlignment" Value="Left" />
           <Setter Property="Template">
               <Setter.Value>
                   <ControlTemplate TargetType="local:ClassShape">
                       <Grid x:Name="RootPanel">
                           <VisualStateManager.VisualStateGroups>
                               <VisualStateGroup x:Name="MouseStates">
                                   <VisualState x:Name="Normal" />
                                   <VisualState x:Name="MouseOver" />
                               </VisualStateGroup>
                               <VisualStateGroup x:Name="CollapsedStates">
                                   <VisualState x:Name="Expanded" />
                                   <VisualState x:Name="Collapsed" />
                               </VisualStateGroup>
                               <VisualStateGroup x:Name="ActiveConectionStates">
                                   <VisualState x:Name="NormalActiveConnectionState" />
                                   <VisualState x:Name="ActiveConnectionInsideShape">
                                       <Storyboard>
                                           <ObjectAnimationUsingKeyFrames Duration="0"
                                                                          Storyboard.TargetName="ActiveSelectedBorder"
                                                                          Storyboard.TargetProperty="Visibility">
                                               <DiscreteObjectKeyFrame KeyTime="0">
                                                   <DiscreteObjectKeyFrame.Value>
                                                       <Visibility>Visible</Visibility>
                                                   </DiscreteObjectKeyFrame.Value>
                                               </DiscreteObjectKeyFrame>
                                           </ObjectAnimationUsingKeyFrames>
                                       </Storyboard>
                                   </VisualState>
                               </VisualStateGroup>
                               <VisualStateGroup x:Name="ConnectorsAdornerVisibilityStates">
                                   <VisualState x:Name="ConnectorsAdornerCollapsed" />
                                   <VisualState x:Name="ConnectorsAdornerVisible">
                                       <Storyboard>
                                           <ObjectAnimationUsingKeyFrames Duration="0"
                                                                          Storyboard.TargetName="ConnectorsControl"
                                                                          Storyboard.TargetProperty="Visibility">
                                               <DiscreteObjectKeyFrame KeyTime="0">
                                                   <DiscreteObjectKeyFrame.Value>
                                                       <Visibility>Visible</Visibility>
                                                   </DiscreteObjectKeyFrame.Value>
                                               </DiscreteObjectKeyFrame>
                                           </ObjectAnimationUsingKeyFrames>
                                       </Storyboard>
                                   </VisualState>
                               </VisualStateGroup>
                               <VisualStateGroup x:Name="SelectionStates">
                                   <VisualState x:Name="Selected" />
                                   <VisualState x:Name="SelectedInGroup" />
                                   <VisualState x:Name="Unselected" />
                                   <VisualState x:Name="SelectedAsGroup" />
                               </VisualStateGroup>
                               <VisualStateGroup x:Name="EditMode">
                                   <VisualState x:Name="NormalMode" />
                                   <VisualState x:Name="NormalEditMode">
                                       <Storyboard>
                                           <ObjectAnimationUsingKeyFrames Duration="0"
                                                                          Storyboard.TargetName="TextContent"
                                                                          Storyboard.TargetProperty="Visibility">
                                               <DiscreteObjectKeyFrame KeyTime="0">
                                                   <DiscreteObjectKeyFrame.Value>
                                                       <Visibility>Collapsed</Visibility>
                                                   </DiscreteObjectKeyFrame.Value>
                                               </DiscreteObjectKeyFrame>
                                           </ObjectAnimationUsingKeyFrames>
                                           <ObjectAnimationUsingKeyFrames Duration="0"
                                                                          Storyboard.TargetName="EditContent"
                                                                          Storyboard.TargetProperty="Visibility">
                                               <DiscreteObjectKeyFrame KeyTime="0">
                                                   <DiscreteObjectKeyFrame.Value>
                                                       <Visibility>Visible</Visibility>
                                                   </DiscreteObjectKeyFrame.Value>
                                               </DiscreteObjectKeyFrame>
                                           </ObjectAnimationUsingKeyFrames>
                                       </Storyboard>
                                   </VisualState>
                                   <VisualState x:Name="TextBoxEditMode">
                                       <Storyboard>
                                           <ObjectAnimationUsingKeyFrames Duration="0"
                                                                          Storyboard.TargetName="TextContent"
                                                                          Storyboard.TargetProperty="Visibility">
                                               <DiscreteObjectKeyFrame KeyTime="0">
                                                   <DiscreteObjectKeyFrame.Value>
                                                       <Visibility>Collapsed</Visibility>
                                                   </DiscreteObjectKeyFrame.Value>
                                               </DiscreteObjectKeyFrame>
                                           </ObjectAnimationUsingKeyFrames>
                                           <ObjectAnimationUsingKeyFrames Duration="0"
                                                                          Storyboard.TargetName="EditTextBox"
                                                                          Storyboard.TargetProperty="Visibility">
                                               <DiscreteObjectKeyFrame KeyTime="0">
                                                   <DiscreteObjectKeyFrame.Value>
                                                       <Visibility>Visible</Visibility>
                                                   </DiscreteObjectKeyFrame.Value>
                                               </DiscreteObjectKeyFrame>
                                           </ObjectAnimationUsingKeyFrames>
                                       </Storyboard>
                                   </VisualState>
                               </VisualStateGroup>
                               <VisualStateGroup x:Name="DropStates">
                                   <VisualState x:Name="DropNormal" />
                                   <VisualState x:Name="DropComplete" />
                                   <VisualState x:Name="DragOver" />
                               </VisualStateGroup>
                           </VisualStateManager.VisualStateGroups>
                           <Grid.RowDefinitions>
                               <RowDefinition Height="Auto" />
                               <RowDefinition Height="*" />
                               <RowDefinition Height="Auto" />
                           </Grid.RowDefinitions>
                           <Border x:Name="ContainerBorder"
                                   Grid.RowSpan="3"
                                   Background="{TemplateBinding Background}"
                                   BorderBrush="{TemplateBinding BorderBrush}"
                                   BorderThickness="{TemplateBinding BorderThickness}"
                                   CornerRadius="8" />
                           <Grid x:Name="NormalContent" MinHeight="50">
                               <Grid.ColumnDefinitions>
                                   <ColumnDefinition />
                                   <ColumnDefinition Width="Auto" />
                               </Grid.ColumnDefinitions>
                               <Border Grid.ColumnSpan="2"
                                       BorderBrush="{TemplateBinding BorderBrush}"
                                       BorderThickness="1 1 1 0"
                                       CornerRadius="8 8 0 0">
                                   <Border.Background>
                                       <LinearGradientBrush StartPoint="0, 0.5" EndPoint="1, 0.5">
                                           <LinearGradientBrush.GradientStops>
                                               <GradientStop Color="#FFD4DDEF" />
                                               <GradientStop Offset="1" Color="#FFFFFFFF" />
                                           </LinearGradientBrush.GradientStops>
                                       </LinearGradientBrush>
                                   </Border.Background>
                               </Border>
                               <StackPanel x:Name="TextContent"
                                           Margin="{TemplateBinding Padding}"
                                           HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                           VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                   <TextBlock FontSize="12"
                                              FontWeight="Bold"
                                              Text="{TemplateBinding Content}" />
                                   <TextBlock x:Name="TypeName"
                                              Grid.Row="1"
                                              Margin="5 0 0 0"
                                              FontSize="9"
                                              Text="" />
Sami
Top achievements
Rank 1
 asked on 20 Sep 2018
10 answers
1.6K+ views
I have filtering enabled in my RadGridView column.  When an existing row has it's cell value updated for the filtered column, the row should be excluded if it's outside of the filter parameters - however, this is not the case.  I have to manually go back and adjust the filter for the row to be excluded.

How can I ensure that all current data in the grid is correctly filtered, even when cells are updated after the row is added?
Stefan
Telerik team
 answered on 20 Sep 2018
0 answers
74 views

This error occurs on RaisePropertyChanged or on this line of code

this.Spreadsheet.Workbook = workbook;

An unhandled exception of type 'System.AggregateException' occurred in mscorlib.dll

Additional information: One or more errors occurred.

here is the code which I use 

input is  stream form ms file dialog

XlsxFormatProvider formatProvider = new XlsxFormatProvider();
workbook = formatProvider.Import(input);
workbook.Name = openFileDialog.SafeFileName;
this.Spreadsheet.Workbook = workbook;
Javor
Top achievements
Rank 1
 asked on 20 Sep 2018
5 answers
236 views

Hello,

This was working in the previous version, but not in R3 2018, with the Office2013 theme.

The column is defined as:

<tk:GridViewDataColumn ColumnGroupName="RoleGroup"
                       DataMemberBinding="{Binding [1]}"
                       Header="1"
                       HeaderTextAlignment="Center"
                       IsGroupable="False"
                       UniqueName="Set1Role"
                       Width="35">
  <tk:GridViewDataColumn.CellTemplateSelector>
    <volley:VolleySetPlayerRoleTemplateSelector NoSet="1" />
  </tk:GridViewDataColumn.CellTemplateSelector>
</tk:GridViewDataColumn>

 

And the text in the header is left aligned, as show in the attached screen shot.

Dinko | Tech Support Engineer
Telerik team
 answered on 20 Sep 2018
3 answers
116 views

I am finding:
1) Create a PAGE, and VIEW MODEL
2) ON the Page:
Add a Tab Control with TWO Tab Items, on each Tab Item add a RadMap and a ComboBox
3) In the VM Create an Observable Collection of Providers and assign to both Combo Boxes on each Tab Item.
4) In the VM create a property(INotifyPropertyChanged) for each SELECTED Provider from each ComboBox, and BIND the Provider to each Map's Provider Dependency Property. (One List / Two Selected Items /Two Maps)
5) Run the App, switch between the Tabs and switch between the ComboBox's Selected Provider and you get botched providers displaying mixed data.
I have determined that when tabbing from one TabItem to an other, the RadMap gets Unloaded and then Reloaded each time, and several resources gets messed up because you do not call the DISPOSE. But, in fact you cant or else you would not be able to tab back... so there are several additional week references that are not detached and memory will continue to leak leading to poorly managed provider tiles etc...  Either that, or there are static references in both Maps reference... That I am not sure yet, still investigating and leaning on the Provider itself.

Has anyone else seen bad behavior on the RadMap with multiple Providers Binding on several Tabs?

thanks,

Don

 

Petar Mladenov
Telerik team
 answered on 20 Sep 2018
3 answers
206 views

The ChartView ToolTip should look like the on in the attached gif.

I figured out that I have to change the TooltipTemplate.

But how can I get the LineSeries X values and Y Values ? In my Source code instead of X and Y I should see in the ToolTip the X value (example: January) and Y Value (example: 2,00). Any ideas ?

Here is my unfinished Source Code: 

private LineSeries CreateLineSeries(KeyValuePair<ChartSerie, List<ChartDataPoint>> chartSeries, ChartLegendSettings legendSettings,
                                           int colorPaletteIndex)
       {
           // TODO: tooltip work in progress, show Format in Tooltips
           FrameworkElementFactory tooltipFramework = new FrameworkElementFactory(typeof(Border));
           tooltipFramework.SetValue(Border.BackgroundProperty, new SolidColorBrush(Colors.DimGray));
           tooltipFramework.SetValue(Border.PaddingProperty, new Thickness(5));
 
           FrameworkElementFactory tooltipStackpanelOne = new FrameworkElementFactory(typeof(StackPanel)) { Name = "tooltipStackpanelOne" };
           tooltipStackpanelOne.SetValue(StackPanel.OrientationProperty, Orientation.Vertical);
           tooltipFramework.AppendChild(tooltipStackpanelOne);
 
           FrameworkElementFactory textBlockOne = new FrameworkElementFactory(typeof(TextBlock));
           textBlockOne.SetValue(TextBlock.TextProperty, "X");
           textBlockOne.SetValue(TextBlock.ForegroundProperty, new SolidColorBrush(Colors.White));
           textBlockOne.SetValue(TextBlock.FontWeightProperty, FontWeights.DemiBold);
 
           FrameworkElementFactory textBlockTwo = new FrameworkElementFactory(typeof(TextBlock));
           textBlockTwo.SetValue(TextBlock.TextProperty, "Y");
           textBlockTwo.SetValue(TextBlock.ForegroundProperty, new SolidColorBrush(Colors.White));
           textBlockTwo.SetValue(TextBlock.FontWeightProperty, FontWeights.DemiBold);
 
           tooltipStackpanelOne.AppendChild(textBlockOne);
           tooltipStackpanelOne.AppendChild(textBlockTwo);
 
           var lineSerie = new LineSeries()
           {
               VerticalAxis    = CreateMultipleVerticalAxis(chartSeries, colorPaletteIndex, out var multipleVerticalAxis) ? multipleVerticalAxis : null,
               ZIndex          = 150, // the line series should always be displayed on top of other series.
               StrokeThickness = 3.5,
               LegendSettings  = (SeriesLegendSettings)legendSettings,
               Opacity         = 0.8,
               //SeriesAnimation = new ChartRevealAnimation()
               //{
               //    AnimationDirection = AnimationDirection.In,
               //    Orientation        = Orientation.Horizontal,
               //    Duration           = new TimeSpan(0, 0, 0, 1, 500),
               //    Delay              = new TimeSpan(0, 0, 0, 0, 555),
               //},
               //PointAnimation = new ChartMoveAnimation()
               //{
               //    MoveAnimationType = MoveAnimationType.Left,
               //    Duration          = new TimeSpan(0, 0, 0, 0, 400),
               //    Delay             = new TimeSpan(0, 0, 0, 0, 155),
               //},
               StackGroupKey = chartSeries.Key.Group,
               CombineMode   = string.IsNullOrEmpty(chartSeries.Key.Group) ? ChartSeriesCombineMode.None : ChartSeriesCombineMode.Stack,
               PointTemplate = new DataTemplate()
               {
                   VisualTree = AddPointsToSeries(chartSeries, colorPaletteIndex),
               },
               LabelDefinitions =
               {
                   // set the clarion format for the labels
                   new ChartSeriesLabelDefinition()
                   {
                       Template = new DataTemplate()
                       {
                           VisualTree = GetSeriesFormat(chartSeries),
                       }
                   }
               },
               TooltipTemplate = new DataTemplate()
               {
                   VisualTree = tooltipFramework,
               }
           };
 
           //// this is the old way of adding point to the LineSeries
           //string pointTemplateString =
           //    @"<DataTemplate xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"">" +
           //    @"<Ellipse Fill=""Black"" Width=""5"" Height=""5"" /></DataTemplate>";
           //lineSerie.PointTemplate = (DataTemplate)XamlReader.Parse(pointTemplateString);
 
           // this is the color of line series
           if (chartSeries.Key.ColorHex != null)
           {
               lineSerie.Stroke = (SolidColorBrush)(new BrushConverter().ConvertFrom(chartSeries.Key.ColorHex));
           }
 
           foreach (ChartDataPoint serie in chartSeries.Value)
           {
               lineSerie.DataPoints.Add(new CategoricalDataPoint()
               {
                   Category = serie.XPoint.Label,
                   Value    = (double?)serie.Value,
               });
           }
 
           return lineSerie;
       }
Dinko | Tech Support Engineer
Telerik team
 answered on 20 Sep 2018
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?