Telerik Forums
UI for WPF Forum
1 answer
338 views

Hello, i am regulary wondering if there is a recommended way to create a window is: create an usercontrol or create an instance in code-behind? 

The documention gives me the impression that the code-behind is the way to go and the usercontrol is just a work-around, but in most examples the usercontrol method is used.

Or it does not matter at all and one should use the method that fits best at the moment?

 

many greetings :-)

Martin Ivanov
Telerik team
 answered on 22 Feb 2021
2 answers
3.3K+ views

I have a few RadButton controls where I would like a different command to execute if the user "long presses" on the button.

For instance a single simple click would do 1 thing and a long click and hold then release would do something else.

How would I do that?

Datafyer
Top achievements
Rank 1
Veteran
 answered on 18 Feb 2021
1 answer
153 views

Hello

If I update, build and run as usual, I get an error. (2020.3.1221.45 -> 2021.1.215.45)

 

 

 

System.Windows.Markup.XamlParseException'(PresentationFramework.dll)

Cannot find resource named 'CardView_DropDownButton_Foreground_Focused'. Resource names are case sensitive

 

I don't use CardvView. I just update and I get an error.

(My environment is NoXaml and Themes is Window7)

Use Reference : Telerik.Windows.Controls,  Telerik.Windows.Controls.Chart, Telerik.Windows.Controls.Data, Telerik.Windows.Controls.GridView,  Telerik.Windows.Controls.Input,  Telerik.Windows.Controls.Navigation, Telerik.Windows.Data,

Thnaks.

Vicky
Telerik team
 answered on 18 Feb 2021
2 answers
215 views

I have a gridview with a databound datetime column in it.

I can change its dataformatstring (or stringformat in binding) so that it shows the date in a short format (dd-mm-yyyy in dutch).

However, when those cells merge, it changes its format to include the time. This means I have a lot of cells that show something like '1-1-2021 00:00:00'.

How can I change that stringformat as well? I could only find a property called contentstringformat, which doesnt do anything.

 

mark
Top achievements
Rank 1
 answered on 18 Feb 2021
6 answers
263 views

Hi,

I'm trying to migrate from RadScheduler to RadscheduleView and I am on version 2012.1.326.40 right now.

Since all my appointments are AllDayEvents, I need the week and day view to only show the AllDayArea and also the AllDayArea needs to have a vertical scrollbar.

I achieved this with the RadScheduler by using a custom theme, reflections-hacks, runtime manipulation of the visual tree and inheriting/reimplementing some AppointmentPanels.

How can I achieve this with RadScheduleView? I hope there is an easier way now.

Any help would be highly appreciated.

Best Regards
Steffen

Steffen
Top achievements
Rank 1
Veteran
 answered on 16 Feb 2021
9 answers
639 views

I have a rad cartesian chart that displays temperature data that are fed at 1s interval.

 

There are several series. 

After about 5-10min, the UI becomes slow and unresponsive. I've tried several render option, Xaml, Bitmap & Direct2DRenderOptions with Batch mode but it still being an issue.

It doesn't seem to happen using scatter series, but then I cannot format the time label on the C

 

<telerik:RadCartesianChart  VirtualizingPanel.IsVirtualizing="True" Background="White"
            Zoom="{Binding Zoom,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"
                                   PanOffset="{Binding PanOffSet,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"
            Grid.Column="2"  Grid.Row="1"  x:Name="TemperaturelineChart" HorizontalAlignment="Stretch" 
                                    VerticalAlignment="Stretch" EmptyContent="Waiting Data...&#xD;&#xA;">

        <telerik:RadCartesianChart.Resources>
                <Style TargetType="telerik:PanZoomBar">
                    <Setter Property="Visibility" Value="{Binding IsScrollbarVisible}"/>
                </Style>

                </telerik:RadCartesianChart.Resources>

            <telerik:RadCartesianChart.Series>
                <telerik:LineSeries>
                    <telerik:LineSeries.RenderOptions>
                        <telerik:Direct2DRenderOptions DefaultVisualsRenderMode="Batch"/>
                    </telerik:LineSeries.RenderOptions>
                </telerik:LineSeries>
            </telerik:RadCartesianChart.Series>

            <telerik:RadCartesianChart.HorizontalAxis >

                <telerik:DateTimeCategoricalAxis LabelRotationAngle="90" SmartLabelsMode="SmartStep"
                                                 MajorTickInterval="10" LabelFormat="HH:mm">

                   
                    </telerik:DateTimeCategoricalAxis>

            </telerik:RadCartesianChart.HorizontalAxis>
            
            
            <telerik:RadCartesianChart.VerticalAxis >
                <telerik:LinearAxis  SmartLabelsMode="SmartStep" Minimum="0" Maximum="{Binding ElementName=Slider, Path=Value, Mode=OneWay}">
                </telerik:LinearAxis>
              
            </telerik:RadCartesianChart.VerticalAxis>
            
            
            <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartPanAndZoomBehavior ZoomMode="Both" />
            </telerik:RadCartesianChart.Behaviors>
            <telerik:RadCartesianChart.InputBindings>
                <MouseBinding Command="{Binding ZoomResetCommand}" MouseAction="RightClick"/>
            </telerik:RadCartesianChart.InputBindings>
        </telerik:RadCartesianChart>
    </Grid>
</commonUtilities:BasePaneView>

 

 

Points added as:

 

            CategoricalDataPoint point = new CategoricalDataPoint
            {
                Label = time,
                Value = Temperature,
                Category = time
            };


            Serie.DataPoints.Add(point);

 

How can I improve performances?

Martin Ivanov
Telerik team
 answered on 16 Feb 2021
1 answer
264 views

Hello,

i was in correspondence with Martin Ivanov and we worked out some information i want to share.

Situation: Multi-Monitor-Environment with Taskbars on every monitor. Docking with floating panes and taskbar icon like: https://github.com/telerik/xaml-sdk/tree/master/Docking/FloatingPaneTaskbarIcons 

Problem: when moving a ToolWindow to the next monitor the taskbar icon stays on the monitor it was created.

Reason: some native WPF window behavior

Workaround: Create a custom ToolWindow and "refresh" icon when window is moved to an other monitor:

public class CustomToolWindow : ToolWindow
{
    private Screen _startMonitor;       
     
    public CustomToolWindow()
    {
        LayoutChangeEnded += Window_LayoutChangeEnded;
        LayoutChangeStarted += Window_LayoutChangeStarted;
    }
     
    private Screen FindMonitor()
    {
        var yCenter = Top + (Height / 2);
        var xCenter = Left + (Width / 2);
 
        return Screen.AllScreens.FirstOrDefault(x =>
            x.Bounds.Top < yCenter && (x.Bounds.Top + x.Bounds.Height > yCenter)
            && x.Bounds.Left < xCenter && (x.Bounds.Left + x.Bounds.Width > xCenter)
        );
    }
     
    private void Window_LayoutChangeStarted(object sender, EventArgs e)
    {
        _startMonitor = FindMonitor();
    }
 
    private void Window_LayoutChangeEnded(object sender, EventArgs e)
    {
        if (!Equals(_startMonitor, FindMonitor()))
        {
            RadWindowInteropHelper.SetShowInTaskbar(sender as ToolWindow, false);
            RadWindowInteropHelper.SetShowInTaskbar(sender as ToolWindow, true);
        }
    }
}

I hope this helps. If someone optimize the code and find a solution to prevent the flickering on "refresh" please share it!

regards marco

Martin Ivanov
Telerik team
 answered on 16 Feb 2021
4 answers
322 views

Hi, I'm developing an RadWizard page with RadBusyIndicator control.
I've got the busy indicator that inside have the RadWizard so I have one busy indicator for all wizard pages.
At last page of wizard I've got an input and I would to set focus to it when the busy indicator finish. But it don't happen.
I've try the solution with FocusHelper.EnsureFocus but nothing happens.

I reproduce the case and attach the project here: https://we.tl/t-nPCbEFRtjw
How can I do this?
I notice that if the BusyIndicator is in WizardPage.Content than all work as aspected.
Thanks

 

Dilyan Traykov
Telerik team
 answered on 16 Feb 2021
1 answer
200 views

Hello,

Is there a way to change the default behavior of hyperlinks within a RichTextBox to allow file:/// links? After inserting a link through the UI, the control seems to automatically add the 'http://' to an address that begins with the file:/// scheme.

Dimitar
Telerik team
 answered on 16 Feb 2021
2 answers
252 views
So i have my background set to a specific color, but I alway want to be able to overlay a png with transparent setction.

If I just need to be able to use the chart as a background I'd use the imagebrush for the background and be done with it.

Is there a way I can set the background to a color AND have a background image?
LoginiMoon
Top achievements
Rank 1
 answered on 15 Feb 2021
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
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?