Telerik Forums
UI for WPF Forum
1 answer
1.2K+ views

Hi,

When I am using the following code to show a splash screen using the RadSplashScreenManager, with StartupLocation = null, only the top left corner of the window is centered on the screen. I have the same behavior without customizing the SplashScreenDataContext :

            var splashScreenDataContext = (SplashScreenDataContext)RadSplashScreenManager.SplashScreenDataContext;
            splashScreenDataContext.ImageHeight = 300.0;
            splashScreenDataContext.ImageStretch = Stretch.Uniform;
            splashScreenDataContext.ImagePath = "/MyAssembly;component/Resources/MyImage.png";

            RadSplashScreenManager.Show();

In the sample, your are using hard coded sizes (260 and 160) to calculate the StartupLocation of the splash screen :

        private void ShowSplashScreen()
        {
            this.timer.Start();
            Mouse.OverrideCursor = Cursors.Wait;
            this.splashScreenDataContext = RadSplashScreenManager.SplashScreenDataContext as SplashScreenDataContext;
            this.splashScreenDataContext.ImagePath = "/SplashScreen;component/SplashScreen.png";
            this.splashScreenDataContext.IsIndeterminate = false;
            this.splashScreenDataContext.Content = "Loading... 0%";
            this.parentWindow.CanMove = false;
            this.parentWindow.IsEnabled = false;
            if (this.parentWindow.WindowState != System.Windows.WindowState.Maximized)
            {
                var x = this.parentWindow.Left + this.parentWindow.ActualWidth / 2 - 260;
                var y = this.parentWindow.Top + this.parentWindow.ActualHeight / 2 - 160;
                RadSplashScreenManager.StartupPosition = new System.Windows.Point(x, y);
            }

            RadSplashScreenManager.Show();
        }

Hard coding the sizes of the window is obviously not ideal. Instead, the splash window should act like any Window with the property SizeToContent="WidthAndHeight".

Can you help ?

Vladimir Stoyanov
Telerik team
 answered on 26 May 2021
0 answers
308 views

Hello,

I have some troubles for getting the RadDatePicker working as expected, while using the propertiy 'DisplayDateStart'. Here my code:

At the start, when I select a date from the first RadDatePicker (valid from), the other one is working correctly (see the ok.png). But if I choose another date (minor to the previous one) some date are still greyed out on the second control (Valid To, see the not_ok.png --> the date 1,2,3,4,5 cannot be selected). I'm not able to reproduce the same error on the other side, changing the valid to control. 

 

Edit:

I found that these controls inherit implicity from a style that has:

        <Setter Property="SelectableDateStart"
                Value="{StaticResource MinimumAllowedDate}" />
        <Setter Property="DisplayDateStart"
                Value="{StaticResource MinimumAllowedDate}" />

where MinimunAllowedData is equal to     <system:DateTime x:Key="MinimumAllowedDate">1/1/1900</system:DateTime>

Removing the SelectableDateStart solve the issue. Still not sure why is this behavior happening?

If I change the control in this way

I still get the error.

 

Are you aware of this behaviour? Or am I missing something? Thank you.

Massimo
Top achievements
Rank 1
 updated question on 26 May 2021
2 answers
1.4K+ views

Hello everyone,

can anyone post me a simple xaml code snipset to add CheckBox items into a ComboBox?

I searched in the forum but there is no simple example.

I thought something like this


<telerik:RadComboBox>
                            <telerik:RadComboBox.ItemTemplate>
                                <DataTemplate>
                                    <kzv:KzvCheckBox/>
                                </DataTemplate>
                            </telerik:RadComboBox.ItemTemplate>
                            <telerik:RadComboBoxItem Content="Test"/>
                        </telerik:RadComboBox>

But the CheckBox is still missing

Thanks for your help.

Guarana91
Top achievements
Rank 1
Iron
Iron
 answered on 26 May 2021
1 answer
185 views

I am using CartersianChart and have a vertical BarSeries attached to it.  Each bar in the series represent a numerical amount. I want to display a horizontal line across the chart at a particular amount so that it can quickly be seen which bars are above and which are below that amount. I'm looking for something similar to the red line in the attached image. Any insight you could give will be greatly appreciated.

 

Thanks,

George

 

Martin Ivanov
Telerik team
 answered on 26 May 2021
1 answer
293 views

Hello.

 

How do I set up the expanded configuration of the Treeview middle model only?

<telerik:RadTreeView.Resources>
	<Style TargetType="telerik:RadTreeViewItem" BasedOn="{StaticResource RadTreeViewItemStyle}">
		<Setter Property="IsExpanded" Value="True"/>
	</Style>
</telerik:RadTreeView.Resources>

This is true for all of the lower layers.

When I first opened it, I only want to open it up to the middle level. (Attach an image)

Thanks.

 

Martin Ivanov
Telerik team
 answered on 25 May 2021
1 answer
280 views
How do I disable or remove the New Folder button in OpenFileDialog?
Dinko | Tech Support Engineer
Telerik team
 answered on 24 May 2021
1 answer
354 views
Is it possible to set a watermark when no value has ben entered in a RadNumericUpDown input box in Telerik UI for WPF?
Dinko | Tech Support Engineer
Telerik team
 answered on 24 May 2021
5 answers
788 views

 

Hello

I've attached an example, and the ContentTemplateSelector will cause a designer exception.
Build and debug works fine.

First. In using navigation I want to control everything by binding in MainWindowViewModel.
Each UserControl is a different screen.
However, the combo box and button are the same.
So, when you move the view, the data should remain the same.

This is actually implemented using RadTabControl.
Tab control does not have a hierarchy, so I want to use navigation.

[TabControl Sample.xaml] : This is automatically set to the datacontext in the window if you do not set the datacontext in the usercontrol.

<telerik:RadTabItem Header="View 1" Width="60" >
    <telerik:RadTabItem.Content>
        <userControl:UserControlView/>
    </telerik:RadTabItem.Content>
</telerik:RadTabItem>

Second. In the current source, Hierarchy 1 and 2 are set to View(UserControlMain - This is not really necessary.).
I want to open only the hierarchy by clicking on the hierarchy. (view maintained, only IsExpanded)

However, if you don't put a View in the selector, an exception will be thrown.
"Must disconnect specific child from current parent Visual before attaching to new parent Visual."
This made it happen when you choose Hierarchy 3.

Images are also attached for easy understanding.

I will be glad for your help.
thank you.

 

Psyduck
Top achievements
Rank 5
Bronze
Bronze
Bronze
 answered on 24 May 2021
1 answer
194 views

I use WPF RadRichTextBox to show/edit HTML-document containing images having restricted access. To show HTML-document inside RadRichTextBox I use HtmlFormatProvider.
In the case of using WebBrowser control, it is enough to call InternetSetCookie to pass user token to the WebRequest used there.

How can I pass the user token to the HTTP request used inside RadRichTextBox to get an image?

Dimitar
Telerik team
 answered on 21 May 2021
1 answer
387 views

Hi,

I have a RadCartesianChart with a ScatterSeriesDescriptor.

My ViewModel of the data points do not have any values that I can bind directly. Instead, I want to bind to properties within another class.

 

Example:

 Public Class PointViewModel

 Public Property MyValueInX As ValueContainer

 Public Property MyValueInY As ValueContainer

End Class

 

Public Class ValueContainer

 Public Property ValueForDiagram As Double

End Class

 

When I try to bind ValueForDiagram I get a System.ArgumentException: "Could not find property 'MyValueInX .ValueForDiagram ' for type 'TelerikTestProjekt.ViewModel.PointViewModel'".


My XAML:

            <telerik:ScatterSeriesDescriptor ItemsSourcePath="Points" XValuePath="MyValueInX.ValueForDiagram" YValuePath="MyValueInY.ValueForDiagram ">

Is there any way I can set this binding?

Best Regards

Sandra

Martin Ivanov
Telerik team
 answered on 21 May 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?