Change of attributes in XAML using templates

2 posts, 0 answers
  1. Thomas
    Thomas avatar
    7 posts
    Member since:
    Dec 2008

    Posted 22 Jan 2009 Link to this post

    I am using the calender with templates to change buttonlayout. I am using an array of elements to define content for
    every day and bind it to the button via date.DayOfYear in a switch statement.

    I have some few issues:

    1) It also bind to the calendars Day names lime Mon, Tue, Wed even if selecting only where DayOfYes is between 1 and 365
        Is it possible to see an attribute there shows it is not a "weekday" button ?

    2) I use a grid, a picture and a border in my template. It can have lots of different scenarios and i cant create 200 different templates. Instead i want to manipulate border thickness and imagename
        I have tried with the following code in my TemplateSelector class


    b1 = item as Border;


    b1.BorderThickness =

    new Thickness(8);


    and the following XAML
    <Border BorderThickness="{Binding Text}" BorderBrush="{Binding Text}">

    Best regards
  2. Hristo
    Hristo avatar
    832 posts

    Posted 27 Jan 2009 Link to this post

    Hi Thomas,

    First sorry for the late response. I'm not sure what you want to achieve here. Could you send us a simple project (with the modified theme) with some screenshots (of what you want to achieve) so I can get a better understanding of your issues?

    Thank you.

    Best wishes,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top