Crashing

8 posts, 0 answers
  1. Jannk
    Jannk avatar
    23 posts
    Member since:
    Jul 2014

    Posted 07 Oct 2014 Link to this post

    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.
  2. Jannk
    Jannk avatar
    23 posts
    Member since:
    Jul 2014

    Posted 07 Oct 2014 in reply to Jannk Link to this post

    Please edit the thread title, I made a mistake submitting this thread before it was ready.
  3. DevCraft banner
  4. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 09 Oct 2014 Link to this post

    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.

     
  5. Jannk
    Jannk avatar
    23 posts
    Member since:
    Jul 2014

    Posted 21 Oct 2014 in reply to Vanya Pavlova Link to this post

    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?
  6. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 23 Oct 2014 Link to this post

    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.

     
  7. Jannk
    Jannk avatar
    23 posts
    Member since:
    Jul 2014

    Posted 27 Oct 2014 in reply to Vanya Pavlova Link to this post

    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:"
  8. Jannk
    Jannk avatar
    23 posts
    Member since:
    Jul 2014

    Posted 27 Oct 2014 in reply to Jannk Link to this post

    forgot the third png:
  9. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 27 Oct 2014 Link to this post

    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.

     
Back to Top
DevCraft banner