What are the names of these controls?

Hi,
what is name of the first control ? Is it the stackpanel?
I cannot view the your sample file due to error. I opened your .xaml file but couldn't find a way to set your border color. Does it automatically set up based on the skin? The second control is a textboxext?, how to fillet its corner radius? Can you give me sample code?


I have viewed your documents online but not sure where their's property?
Thanks 

13 Replies 1 reply marked as answer

JA jamin April 6, 2021 06:08 PM UTC

Hello, how to setup with skinmanager? I always get the error after running code

-------------------------------------------------------------------------
       mainwindow.xaml

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:PQD"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf" 
         xmlns:system="clr-namespace:System;assembly=mscorlib"
        xmlns:syncfusionskin ="clr-namespace:Syncfusion.SfSkinManager;assembly=Syncfusion.SfSkinManager.WPF"
         x:Class="MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="458" Width="611" 
        ShowInTaskbar="False" 
        WindowStartupLocation="CenterScreen"
        syncfusionskin:SfSkinManager.Theme="{syncfusionskin:SkinManagerExtension ThemeName=FluentLight}"
        syncfusionskin:SfSkinManager.VisualStyle="{Binding ElementName=comboVisualStyle, Path=SelectedValue, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
        >
    <Window.Resources>
      <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Syncfusion.Themes.FluentLight.WPF;component/ButtonAdv/ButtonAdv.xaml"/>
        </ResourceDictionary.MergedDictionaries>
      </ResourceDictionary>
    </Window.Resources>
I want to set the theme for all instead of just buttonadv.
Thanks!


AS Anandraj Selvam Syncfusion Team April 7, 2021 01:42 PM UTC

Hi Alex,  
  
Greetings from the Syncfusion.  
  
Currently we are validating the reported issue and we will let you know the complete details on or before April 9th, 2021.  
  
We appreciate your patience until then. 
  
Regards,  
Anand Raj S. 



JA jamin April 7, 2021 02:36 PM UTC

Hi Anandraj ,
I think the good way is if possible you can set up a simple sample file with 1.2 controls with the skin, I can take a look. 
Your example syncfusion.dropdowndemos.wpf_47 is pretty hard to follow.


EM Elakkiya Muthukumarasamy Syncfusion Team April 7, 2021 02:52 PM UTC

Hi Alex, 
 
Greetings from Syncfusion. 
 
Query1: how to setup with skinmanager? 
We have checked this query in simple sample, but we could not reproduce this exception. So please shared your sample project which is helpful to provide the prompt solution on this. 
 
Query2: what is name of the first control ? Is it the stackpanel? 
 
This is not a control or stack panel this is a border which is set by using the BorderAlt resource key which is available in each theme Brushes.xaml file. 
 
You can access this key by adding the below code in your resource dictionary from themes assembly in the application and set as static resources of border. 
 
The resource dictionary will be in this format: /Syncfusion.Themes.<ThemeName>.WPF;component/Common/Brushes.xaml 
 
Example 
 
/Syncfusion.Themes.FluentLight.WPF;component/ Common / Brushes.xaml. 
 
 
 
Code example: 
 
<Border Height="200" Width="300" BorderThickness="2" BorderBrush="{StaticResource BorderAlt }"> 
 
Query 3: couldn't find a way to set your border color. Does it automatically set up based on the skin? 
 
The BorderColor and corner radius can be setting automatically based on the theme. Also, you can be able to set your border color and corner radius by overrides the TextBox Control styles. 
 
Code snippet to customize Border color: 
 
 
<Window.Resources> 
<ResourceDictionary> 
<ResourceDictionary.MergedDictionaries> 
<ResourceDictionary Source="/Syncfusion.Themes.FluentLight.WPF;component/Common/Brushes.xaml"/> 
<ResourceDictionary Source="/Syncfusion.Themes.FluentLight.WPF;component/MSControl/TextBox.xaml"/> 
</ResourceDictionary.MergedDictionaries> 
</ResourceDictionary> 
</Window.Resources> 
 
<Grid> 
 
 
<Grid.Resources> 
<Style x:Key="CustomTextBoxStyle" TargetType="TextBox" BasedOn="{StaticResource WPFTextBoxStyle}" > 
<Setter Property="BorderBrush" Value="Red"/> 
</Style> 
</Grid.Resources> 
 
<Border Height="200" Width="300" BorderThickness="2" BorderBrush="{StaticResource BorderAlt }"> 
<TextBox Height="50" Width="150" Text="TextBox" HorizontalAlignment="Center" VerticalAlignment="Center" Style="{DynamicResource CustomTextBoxStyle}"> 
</TextBox> 
</Border> 
</Grid> 
 
Code snippet to customize corner radius: 
 
<TextBox Height="50" Width="150" Text="TextBox" HorizontalAlignment="Center" VerticalAlignment="Center" Style="{DynamicResource CustomTextBoxStyle}"> 
<TextBox.Resources> 
<Style TargetType="{x:Type Border}"> 
<Setter Property="CornerRadius" Value="3"/> 
</Style> 
</TextBox.Resources> 
 
 
 
 
Output: 
 
 
 
Query 3: The second control is a textboxext? 
 
The second one is TextBox control not the TextBoxExt control . 
 
Please try it with the above solution and let us know if you need any further assistance on this. 
 
Regards, 
Elakkiya 


Marked as answer

JA jamin April 7, 2021 04:33 PM UTC

Hi Elakkiya 

see my image:

Is there a shorter way to do that? 
when setting up syncfusion: SfSkinManager.VisualStyle = "FluentLight" 
Everything seemed to show up as I wanted, but when I ran the code everything didn't go. 
Do I need to do this with all other controls? I want to use the your skin default setting as graphically since I don't need any specific setting such as radius = 3.
.



JA jamin April 7, 2021 07:08 PM UTC

Hi,
Please check my sample file. 
I'm exhausted. 
Thanks you!
.


Attachment: PD_a2f209c2.rar


JA jamin April 8, 2021 02:49 AM UTC

Hi,
I want to give some more info: I'm loading this program into Inventor. and call this dll from there. Is it a problem? 
Mainwindow cls = New Mainwindow;
cls.ShowDialog();
My code works fine without the skin. But there is an error since: 
syncfusion:SfSkinManager.VisualStyle="FluentLight"
or
SfSkinManager.SetTheme(Me, New Theme("FluentLight"))


VR Vijayalakshmi Roopkumar Syncfusion Team April 8, 2021 02:25 PM UTC

Hi Alex 
 
Please find the response for the queries 
 
S.NO 
Query 
Response 
1 
Is there a shorter way to do that?  
when setting up syncfusion: SfSkinManager.VisualStyle = "FluentLight"  
Everything seemed to show up as I wanted, but when I ran the code everything didn't go.  
Do I need to do this with all other controls? I want to use the your skin default setting as graphically since I don't need any specific setting such as radius = 3. 
 
We regret that we are unable to get your actual requirement is. So could you please brief about your requirement clearly . If the watermark need to set for sftextbox , that is the only way.  However please brief about your query related to theme , it would be helpful for us to check and provide you the exact solution. 
2 
Please check my sample file.  
I'm exhausted.  
Thanks you! 
I want to give some more info: I'm loading this program into Inventor. and call this dll from there. Is it a problem?  
Mainwindow cls = New Mainwindow; 
cls.ShowDialog(); 
My code works fine without the skin. But there is an error since:  
syncfusion:SfSkinManager.VisualStyle="FluentLight" 
or 
SfSkinManager.SetTheme(Me, New Theme("FluentLight")) 
 
We have checked the reported crash using your sample, but we are unable to deploy your application, as it throws the following warning 
 
 
 
On further checking your sample, you have been attached the following location in Start external program option 
 
C:\Program Files\Autodesk\AutoCAD 2022\acad.exe 
 
So could you please let us know what might be need to deploy your application. It would be helpful for us to investigate on your case better at our end 
 
 
Please let us know if you have any other concerns. 
 
Regards, 
Vijayalakshmi VR 



JA jamin April 11, 2021 10:44 AM UTC

Hi Vijayalakshmi,
setting them up is quite troublesome. I am testing on other environments but it has not been successful yet. Have you ever called wpf with skin on some app via showdialog or application.run yet?


Update: Seems problem with fluentlight or fluentdark, i alway get this on form load event:
, tried with other themes can load without problem but skin doesnot applied
So I added a new question with the control sfskin. This post has been resolved.

Thanks you!





RP Ram Prasanna Madheswaran Syncfusion Team April 12, 2021 12:45 PM UTC

Hi Alex, 
 
Thanks for your update. 
 
We are checking your reported query and we will update you the further details on 13th April 2021.We appreciate your patience until then. 
 
Regards, 
M.Ram Prasanna. 



EM Elakkiya Muthukumarasamy Syncfusion Team April 13, 2021 01:22 PM UTC

 
Hi Alex, 
 
Thanks for your patience. 
 
On the further analysis we could not reproduce the reported issue with the simple sample.in that sample we have set ApplyStylesOnApplication and use showdialog as like you mentioned but we could not reproduce this problem. 
 
So please share the below details these details will be helpful to provide the prompt solution on this. 
 
1.This exception occurred only while used in Fluent theme or Material, Office theme also throwing exception 
2.You have used .net frame work project or .net core project  
 
Otherwise please share us your availability to set up a web meeting . So that we will check the reported problem in your application environment and provide you the solution. We will make every effort to have this scheduled on a date and time of your convenience. 
 
Regards, 
Elakkiya 



JA jamin April 14, 2021 04:24 AM UTC

Hi Elakkiya ,
I am preparing a .rar file, hope you can debug it.


VR Vijayalakshmi Roopkumar Syncfusion Team April 15, 2021 05:26 AM UTC

Hi Alex

Thank you for your update.

We will wait until we hear from you.

Regards,
Vijayalakshmi VR

Loader.
Up arrow icon