This is a migrated thread and some comments may be shown as answers.

Crashing

7 Answers 62 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jannik
Top achievements
Rank 1
Jannik asked on 07 Oct 2014, 11:08 AM
Hello!

We're having problems with the XAML UI Designer when applying a style to our checkboxes.

<UserControl x:Class="SilverlightApplication1.MainPage"
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:telerik="http://schemas.telerik.com/2008/xaml/presentation"
d:DesignHeight="300"
d:DesignWidth="400"
mc:Ignorable="d">
<UserControl.Resources>
<Style TargetType="CheckBox">
<Setter Property="telerik:StyleManager.Theme" Value="Office_Blue" />
</Style>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<CheckBox Width="210" Height="10" />
</Grid>
</UserControl>

Everytime we use a checkbox, our designer crashes, if we delete it, everything is fine again.Our system is using a lot of checkboxes and we aren't able to use the designer when designing our UI.

This results us having to debug everytime we make a small ui-change wanting to see if everything is still looking as expected.

7 Answers, 1 is accepted

Sort by
0
Jannik
Top achievements
Rank 1
answered on 07 Oct 2014, 11:09 AM
Please edit the thread title, I made a mistake submitting this thread before it was ready.
0
Vanya Pavlova
Telerik team
answered on 09 Oct 2014, 07:59 AM
Hello Jannk,


As it turns out, the application is crashing due to the wrong definition of the style targeted at CheckBox.  

For Silverlight you should use the notation below: 

<Style TargetType="CheckBox" telerik:StyleManager.BasedOn="Office_Blue">
    .................
</Style>

Hope this helps. 


Regards,
Vanya Pavlova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Jannik
Top achievements
Rank 1
answered on 21 Oct 2014, 01:38 PM
Hey,

thank you, it worked fine on two of our controls (checkbox and combobox).

BUT unfortunately we use the office blue style on ScrollViewer aswell. And applying the style to the ScrollViewer ends up having our page screwed up (all inner controls are aligned to the right etc). If I use it the way I did before (which resulted in crashing designer) it works fine again and all looks nice, but as i said its crashing everytime the xaml has a scrollviewer in it...

Can you tell me what exactly is the difference between both ways? What does based on in a different way and can we restyle all those differences?
0
Vanya Pavlova
Telerik team
answered on 23 Oct 2014, 07:53 AM
Hi Jannk,


Thank you for getting back to us. 

StyleManager.BasedOn is an attribute, primarly used when you want to apply simple changes to an element with a style in this mode.

Generally you should not experience such a behavior. 
Can you post the error you are currently getting?


Regards,
Vanya Pavlova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Jannik
Top achievements
Rank 1
answered on 27 Oct 2014, 12:42 PM
We don't get any errors, but our views look different when using a normal setter and when using the based on attribute. See attached both views setter.png and basedOn.png - Both have exactly the same code, just the style is different.

Further more another view is crashing (endless loop) with a white screen when using BasedOn (see error.png)
"Zeile: 82 Fehler: Unhandled Error in Silverlight Application  Code: 4008    Category: RuntimeError    Message: Es wurde ein Layoutzyklus entdeckt. Das Layout konnte nicht abgeschlossen werden.   <- Layout circle
MethodName:"
0
Jannik
Top achievements
Rank 1
answered on 27 Oct 2014, 12:44 PM
forgot the third png:
0
Vanya Pavlova
Telerik team
answered on 27 Oct 2014, 01:09 PM
Hi Jannk,


In order to avoid any additional round trips, I believe that the best option here is to try to isolate the problem in small runnable demo. 

You can send it back to us as an attachment in a new support thread. 
We will take a look at this demo and we will try to found out an appropriate solution for your case. 


Regards,
Vanya Pavlova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Jannik
Top achievements
Rank 1
Answers by
Jannik
Top achievements
Rank 1
Vanya Pavlova
Telerik team
Share this question
or