Telerik Forums
UI for WPF Forum
0 answers
58 views

I have VerticalLinearScale with properties:

Min= 0

Max = 100

MajorTickStep = 20

MiddleTicks = 4

by click on button I changed the values of the properties to:

Min= 0
Max = 30000
MajorTickStep = 5000
MiddleTicks = 10

the problem is that it takes too much time till the element render again with the new values

I attached my sample with the problem

Thanks,

Shoshana

 

 

שושי
Top achievements
Rank 1
 asked on 06 Nov 2018
3 answers
81 views

Hello again!

I am creating custom RadDiagramShape as it is written in Telerik documentation: https://docs.telerik.com/devtools/wpf/controls/raddiagram/howto/create-custom-shape . It contains 2 borders and an image inside of them. When I am doing it according to the documentation, rotation and zoom after rotation works weird with ancor-points of this CustomControl. When I am doing 2 borders and an image inside RadDiagramShape inside xaml without any CustomControl it works as it should.

The picture of weird behaviour is attached (after rotating of both figures).

Would you be so kind to tell me how I can fix this weird behaviour of my CustomControl?

This is my .cs code

public class RasterObject : RadDiagramShapeBase
{
    static RasterObject()
    {
        DefaultStyleKeyProperty.OverrideMetadata(typeof(RasterObject), new FrameworkPropertyMetadata(typeof(RasterObject)));
    }
 
    public static readonly DependencyProperty ContrastyBorderBrushProperty =
         DependencyProperty.Register("ContrastyBorderBrush", typeof(Brush),
         typeof(RasterObject), new FrameworkPropertyMetadata(Brushes.Transparent));
 
    // .NET Property wrapper
    public Brush ContrastyBorderBrush
    {
        get { return (Brush)GetValue(ContrastyBorderBrushProperty); }
        set { SetValue(ContrastyBorderBrushProperty, value); }
    }
 
    public static readonly DependencyProperty SourceProperty =
         DependencyProperty.Register("Source", typeof(ImageSource),
         typeof(RasterObject));
 
    // .NET Property wrapper
    public ImageSource Source
    {
        get { return (ImageSource)GetValue(SourceProperty); }
        set { SetValue(SourceProperty, value); }
    }
 
 
}

This is my style code:

<Style TargetType="{x:Type local:RasterObject}">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type local:RasterObject}">
                <Border BorderBrush="{TemplateBinding ContrastyBorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Image Source="{TemplateBinding Source}" Stretch="Fill"/>
                    </Border>
                </Border>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

This is my Xaml code:

<telerik:RadDiagram  IsBackgroundSurfaceVisible="True">
                                     
                                    <telerik:RadDiagramShape Position="50, 50" Background="Transparent" BorderBrush="Transparent">
                                        <Border BorderBrush="Red" BorderThickness="13" >
                                            <Border BorderBrush="Blue" BorderThickness="23" >
                                                <Image Source="/Images/MainToolbar/Arc.png" Stretch="Fill"/>
                                            </Border>
                                        </Border>
                                    </telerik:RadDiagramShape>
                                    <imageeditor:RasterObject BorderBrush="Gray" BorderThickness="10"
                                                               ContrastyBorderBrush="White"
                                                              Source="/Images/MainToolbar/Arc.png"/>
                                     
 
                                </telerik:RadDiagram>

 

Best regards,
Tatiana

Martin Ivanov
Telerik team
 answered on 06 Nov 2018
11 answers
379 views
Hello, I'm just wondering if this is possible out of the box through a setting. We want the user to be able to press Esc while dragging an object and have that cancel the dragging, just like in the Windows Explorer.

Thanks.
Dinko | Tech Support Engineer
Telerik team
 answered on 05 Nov 2018
8 answers
255 views

     I downloaded the WPF demo app to get examples on how to create UI items similar to the examples.  I'm finding that I'm always missing references and have to google which reference I need for certain controls.  I also can't find resources, not sure if they are in another library or if they were omitted from the source code.  It's getting frustrating to struggle with every control.

Right now I'm trying to get the RadPieChart to work so I copied in the markup into my page and the RadPieChart wasn't found.  I had to google to find out I was missing a reference to Telerik.Windows.Controls.Chart. 

Now I got that working but noticed I was missing some styles which I found in the Resources.xaml.  When I copy in those styles they have "basedon" set to another style and I don't know if it's missing or if it's a reference.

Any chance these demos could be easier to copy in so I don't have to google everything and figure it out, I don't need anything fancy, I just need it to work so I can start fiddling around with it.

For reference I'm looking at the Layout Control and trying to get a little doughnut pie chart like in the steps per day.

Martin Ivanov
Telerik team
 answered on 05 Nov 2018
1 answer
640 views

I have a very simple wizard that contains 3 pages. The first page should always be shown and is the starting point for the wizard. Now, I have the SelectionChanging event hooked up on the wizard to perform some validation before allowing the user to move on. However, here is where the trick comes in:I would like to be able to skip step two if certain conditions are met and move the user directly to the last page of the wizard. Likewise, as long as this condition is met, if the user then clicks Back to go to the previous step, I'd like to take the user to the first page in this scenario.

I cannot remove the second page of the wizard because this page may be needed in some cases depending on whether the specified criteria is met. Apparently, setting the Wizard's SelectedPage property to the page I want isn't the right way to do it because it puts the wizard into an infinite loop where it keeps going between the first page and the last page because when I set the SelectedPage to the last page, the SelectionChanging event is raised again, but this time with the direction saying Backward which gets the wizard to go back to the first page since the OldPage is now the last page and the direction is Backward and the criteria for skipping the middle step is met, the SelectedPage is set back to the first page which raises the SelectionChanging event with the direction Forward and the OldPage being the first page... and round and round we go.

I'm looking for a solution that doesn't require me to add or remove pages to the collection on the fly and doesn't briefly navigate to the second page in a fashion that it creates a "stutter" to the user where it's obvious that the software is simulating the user clicking the next button when the second page is active.

 

TIA.

Martin Ivanov
Telerik team
 answered on 05 Nov 2018
3 answers
1.1K+ views

I want to display an image editor withuot tools. (I need only the ability to control the brightness and contrast, what I can do programmatically).

I want the image will be displayed fully in the image editor, without scrolling.

How can I do that?

Martin Ivanov
Telerik team
 answered on 02 Nov 2018
2 answers
127 views

Hi,

https://github.com/telerik/xaml-sdk/tree/master/ChartView/WPF/SeriesProvider

 

# SeriesProdvider project

1. Add new item : window1.xaml (include one button)

 2. app.xaml  StartupUri   set  window1.xaml 

 3.  window1.xaml  button client event

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            MainWindow w = new MainWindow();
            w.ShowDialog();
        }

4. Run button click - PopupWindow Open & Close (Loop.. Loop.. Loop)

5. Memeory Leak check

 

I found a solution

        public MainWindow()
        {
            InitializeComponent();
            this.Unloaded += MainWindow_Unloaded;               
        }
        private void MainWindow_Unloaded(object sender, RoutedEventArgs e)
        {
            chart.SeriesProvider.Source = null; 
        }

I want to more best solution, for plan MVVM project

 

Martin Ivanov
Telerik team
 answered on 02 Nov 2018
2 answers
127 views

While implementing the LayoutControlExpanderGroup in my project I thought the doughnut charts shown in the WPF example were quite nice visually so decided to use those for weights on transactions.  After many days of struggling to reproduce the code I finally got something somewhat working but I'm still having problems.  I don't know where to set the max value of a chart, I'm guessing the example has it set at around 15,000 since even 11234 steps on Feb, 09 is still a ways away from the max.  My weights go from 25,000 up to 170,000 so even the lowest weight show 100% filled.  I can't find documentation on where to set this max value.

 

I'm also having a hard time wrapping the text in the middle.  I have a date time that has year/month/day followed by a space then hour/minute.  For some reason it's all on the same line and goes outside the doughnut.

 

My XAML is quite similar to the example in the StepsPerDay.xaml in the Layout Control demo (first look).  I just have different properties bound to it.

<telerik:RadPieChart Palette="Flower"
                         Style="{StaticResource ChartStyle}">
                        <telerik:RadPieChart.Series>
                            <telerik:DoughnutSeries ItemsSource="{Binding Transaction.Weights}"
                                    InnerRadiusFactor="0.75"
                                    RadiusFactor="1"
                                    ValueBinding="Weight">
                                <telerik:DoughnutSeries.AngleRange>
                                    <telerik:AngleRange StartAngle="270" />
                                </telerik:DoughnutSeries.AngleRange>
                                <telerik:DoughnutSeries.SliceStyles>
                                    <Style TargetType="Path">
                                        <Setter Property="Fill" Value="{Binding DataItem.WeightFill}" />
                                    </Style>
                                </telerik:DoughnutSeries.SliceStyles>
                                <telerik:DoughnutSeries.LabelDefinitions>
                                    <telerik:ChartSeriesLabelDefinition Margin="20">
                                        <telerik:ChartSeriesLabelDefinition.Template>
                                            <DataTemplate>
                                                <StackPanel>
                                                    <TextBlock Text="{Binding DataItem.WeightDisplay}" 
                                                               Style="{StaticResource BoldLabelStyle}" />
                                                    <TextBlock Text="{Binding DataItem.WeighInTimeDisplay}"
                                                               Foreground="Black"
                                                               TextWrapping="Wrap"
                                                               TextAlignment="Center" />
                                                </StackPanel>
                                            </DataTemplate>
                                        </telerik:ChartSeriesLabelDefinition.Template>
                                    </telerik:ChartSeriesLabelDefinition>
                                </telerik:DoughnutSeries.LabelDefinitions>
                            </telerik:DoughnutSeries>
                        </telerik:RadPieChart.Series>
                    </telerik:RadPieChart>

Martin Ivanov
Telerik team
 answered on 02 Nov 2018
1 answer
108 views

I'm using the RadCollectionNavigator in a WPF UserControl.  

 

The CurrentItem Is Bound, TwoWay to a DataContext property.

 

Everytime I navigate using the RCN's navigation buttons the CurrentItem setter is called 3 times.

 

I using ReferenceEquals() to ignore additional calls to the setter with the same value but this causes other problems.

 

Will I need to override the built in navigation buttons to eliminate this behavior?

 

<telerik:RadCollectionNavigator Source="{Binding EvidenceItems}" CurrentItem="{Binding CurrentNavItem, Mode=TwoWay}"/>

 

private EvidenceGridData _CurrentNavItem;
        public object CurrentNavItem
        {
            get { return _CurrentNavItem; }
            set
            {
                if (ReferenceEquals(_CurrentNavItem, value))
                    return;

                _CurrentNavItem = value as EvidenceGridData;
                RaisePropertyChanged(nameof(CurrentNavItem));
            }
        }

Stefan
Telerik team
 answered on 02 Nov 2018
1 answer
130 views

Hi all,

I know I can overwrite all the style of the docking controls, but I was wondering if there is an easier way to do what I want.
I want that when I have the mouse focused inside my control that is inside a RadPaneGroup the border would be highlighted just like the picture have attached.

Thanks for your help
Simon

Vladimir Stoyanov
Telerik team
 answered on 01 Nov 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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?