Telerik Forums
UI for WPF Forum
2 answers
105 views
is there any documentation on Styling Docking?
Chiara
Top achievements
Rank 1
 answered on 08 Nov 2011
1 answer
399 views

Hey,

I know its a bit hasty, what i wanted to apply custom style on RadMaskedNumericInput Control and it just not working for me.
I'm not good at styling but the peice of code given below worked for my default .NET textbox. But when i apply it to RadTextbox it froze the input area, although applies the facny rounded corner and color.

Please tell me what am i doing wrong here.




 

 

<Style x:Key="TextBox" TargetType="{x:Type my:BaseNumericBox}">

 

 

<Setter Property="SnapsToDevicePixels"

 

Value="True" />

 

 

<Setter Property="OverridesDefaultStyle"

 

Value="True" />

 

 

<Setter Property="KeyboardNavigation.TabNavigation"

 

Value="none" />

 

 

<Setter Property="FocusVisualStyle"

 

Value="{x:Null}" />

 

 

<Setter Property="MinWidth"

 

Value="120" />

 

 

<Setter Property="MinHeight"

 

Value="20" />

 

 

 

<Setter Property="AllowDrop"

 

Value="true" />

 

 

 

<Setter Property="Template">

 

 

<Setter.Value>

 

 

<ControlTemplate TargetType="{x:Type my:BaseNumericBox}">

 

 

<Grid>

 

 

<Border Name="Border"

 

CornerRadius="2"

 

Padding="2"

 

BorderThickness="1">

 

 

<Border.Background>

 

 

<SolidColorBrush Color="{DynamicResource TextBoxControlLightColor}" />

 

 

</Border.Background>

 

 

<Border.BorderBrush>

 

 

<SolidColorBrush Color="{DynamicResource TextBoxBorderMediumColor}" />

 

 

</Border.BorderBrush>

 

 

<VisualStateManager.VisualStateGroups>

 

 

<VisualStateGroup x:Name="CommonStates">

 

 

<VisualState x:Name="Disabled">

 

 

<Storyboard>

 

 

<ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"

 

Storyboard.TargetProperty="(Panel.Background).

(SolidColorBrush.Color)">

 

 

<EasingColorKeyFrame KeyTime="0"

 

Value="{DynamicResource TextBoxDisabledControlLightColor}" />

 

 

</ColorAnimationUsingKeyFrames>

 

 

</Storyboard>

 

 

</VisualState>

 

 

<VisualState x:Name="Normal">

 

 

<Storyboard>

 

 

<ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"

 

Storyboard.TargetProperty="(Panel.Background).

(SolidColorBrush.Color)">

 

 

<EasingColorKeyFrame KeyTime="0"

 

Value="{DynamicResource TextBoxControlLightColor}" />

 

 

</ColorAnimationUsingKeyFrames>

 

 

</Storyboard>

 

 

</VisualState>

 

 

<VisualState x:Name="ReadOnly">

 

 

<Storyboard>

 

 

<ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"

 

Storyboard.TargetProperty="(Panel.Background).

(SolidColorBrush.Color)">

 

 

<EasingColorKeyFrame KeyTime="0"

 

Value="{DynamicResource TextBoxDisabledControlDarkColor}" />

 

 

</ColorAnimationUsingKeyFrames>

 

 

</Storyboard>

 

 

</VisualState>

 

 

 

<VisualState x:Name="MouseOver" />

 

 

</VisualStateGroup>

 

 

</VisualStateManager.VisualStateGroups>

 

 

<ScrollViewer Margin="0"

 

x:Name="PART_ContentHost" />

 

 

</Border>

 

 

</Grid>

 

 

<ControlTemplate.Triggers>

 

 

<MultiTrigger>

 

 

<MultiTrigger.Conditions>

 

 

<Condition Property="IsFocused" Value="False"></Condition>

 

 

<Condition Property="Text" Value=""></Condition>

 

 

</MultiTrigger.Conditions>

 

 

<MultiTrigger.Setters>

 

 

</MultiTrigger.Setters>

 

 

</MultiTrigger>

 

 

<Trigger Property="IsFocused" Value="True">

 

 

<!--<Setter Property="BorderThickness" TargetName="BorderBase" Value="2.4,2.4,1,1"></Setter>-->

 

 

</Trigger>

 

 

<Trigger Property="IsEnabled" Value="False">

 

 

<Setter Property="Foreground" Value="DimGray" />

 

 

<!--<Setter Property="FontStyle" Value="Italic" />-->

 

 

</Trigger>

 

 

</ControlTemplate.Triggers>

 

 

</ControlTemplate>

 

 

</Setter.Value>

 

 

</Setter>

 

 

 

 

</Style>

Tina Stancheva
Telerik team
 answered on 08 Nov 2011
3 answers
111 views
Hi there,
    I'm using a telerik radwindow and I want add a pdf document to it ,but it dosen't show anything except when in this area the cursor changes,but it works well when I use a WPF window,because of a property of WPF window called 'AllowTransparent',when I give a false value to this property,the pdf appearance normaly,First,radwindow does not have this property,second,is there anything else makes radwindow not showing Pdf?
    Could I use radwindow to show Pdf inside?
Miroslav Nedyalkov
Telerik team
 answered on 08 Nov 2011
1 answer
86 views
Hi,
I have a gridview having a grid in its rowdetail, when row detail visibility changes i fetch data from database to load the row detail grid.
But the problem here is that when i sort or filter on the main grid, the data is removed from the already opened row detail grid.

Please let me know is there anything i can do so that those row detail grid data does not get removed when I do sorting or filtering on main grid.

Thanks,
Nitin.
Nitin
Top achievements
Rank 1
 answered on 08 Nov 2011
3 answers
109 views
How do I export multiple GridViews to multiple worksheets in a single Excel workbook?
Vlad
Telerik team
 answered on 08 Nov 2011
2 answers
149 views
Hi

I am making a WPF application where i use the Microsoft Kinect as a input device.
So if i want to acces my Gridview, i will need buttons to select the row selection to go up and down.
     1.Since i have a Click system with my Kinect device, i only need a system to select the rows?
     2. When i select a row, i want a pop-up window with the details of the row, like NAME, EMAIL, SUBJECT and TEXT.
                - I  have no idea how to do this?            

How can i do this, I found things on your forum that includes RECORDS, but since u dont use them anymore, im struggling to find my way.
This is what i got

 

private void Button_Click(object sender, RoutedEventArgs e)
{
    int i = this.radGridView.Records.IndexOf(this.radGridView.SelectedRecord);
    int nextCurrentIndex = i + 1;
 
    if (nextCurrentIndex < this.radGridView.Records.Count)
    {
        Record nextCurrentRecord = this.radGridView.Records[nextCurrentIndex];
        nextCurrentRecord.IsSelected = true;
    }
}

Pavel Pavlov
Telerik team
 answered on 07 Nov 2011
1 answer
62 views
Hello I'm trying to put a minimum and maximum in the Y but I do not take, attached code and screenshot
<telerik:RadChart Visibility="{Binding visibilidadGraficaBarras, Converter={StaticResource boolToVis}}" x:Name="radChart2"
Width="400" Height="440" ItemsSource="{Binding ListaRespuestas}" >
                                     
<telerik:ChartArea>
<telerik:ChartArea.AxisY>
<telerik:AxisY  MinValue="30" MaxValue="90" Step="10"></telerik:AxisY>
</telerik:ChartArea.AxisY>
</telerik:ChartArea>
                                     
<telerik:RadChart.PaletteBrushes>
<SolidColorBrush Color="ForestGreen"></SolidColorBrush>
</telerik:RadChart.PaletteBrushes>
<telerik:RadChart.SeriesMappings>
<telerik:SeriesMapping LegendLabel="Perfil de puntuaciones T"  >
<telerik:SeriesMapping.SeriesDefinition   >
<telerik:BarSeriesDefinition>
</telerik:BarSeriesDefinition>
</telerik:SeriesMapping.SeriesDefinition>
<telerik:SeriesMapping.ItemMappings>
<telerik:ItemMapping FieldName="Valor"  DataPointMember="YValue"/>
<telerik:ItemMapping FieldName="Tipo" DataPointMember="XCategory" />
</telerik:SeriesMapping.ItemMappings>
</telerik:SeriesMapping>
</telerik:RadChart.SeriesMappings>
</telerik:RadChart>
Nikolay
Telerik team
 answered on 07 Nov 2011
1 answer
84 views
Hello,

1)
Is it possible to get ActualWidth of AxisX?
we can easily find ActualWidth  of Chart area by RadChart1.DefaultView.ChartArea.ActualWidth.
But unable to find ActualWidth   of AxisX.

2)
Is it possible re-template of item label AxisX?



Thanks in advance.

Regards,
Dhaval patel.

Tsvetie
Telerik team
 answered on 07 Nov 2011
1 answer
114 views
Hello,

Using 2011 Q2 RadScheduleView im trying to "Shrink" the size of the month view so that it is smaller and has no scroll bar.I can do this easily for the day and week view using the (Min/Max)TimeRulerExtents but these have no impact in month view.

How can I achieve this functionality?

Thanks.
Konstantina
Telerik team
 answered on 07 Nov 2011
3 answers
112 views
Hello,

I have a gridview bound to an observablecollection( of linq to sql class)
For editing a foreignkey in this class I use a gridviewcombocolumn:
Grid.Columns.Add(New GridViewComboBoxColumn With {
                                             .Header = "PC",
                                             .ItemsSource = vm.PurchaseCodes,
                                             .SelectedValueMemberPath = "",
                                             .DataMemberBinding = New Binding("PurchaseCode"),
                                             .DisplayMemberPath = "DisplayName"})
In this situation the filtercontrol gives an error and also I've the idea that binding like this gives slower performance than binding to "PurchaseCodeID", like this:
Grid.Columns.Add(New GridViewComboBoxColumn With {
                                             .Header = "PC",
                                             .ItemsSource = vm.PurchaseCodes,
                                             .SelectedValueMemberPath = "PurchaseCodeID",
                                             .DataMemberBinding = New Binding("PurchaseCodeID"),
                                             .DisplayMemberPath = "DisplayName"})
But in this situation linq to sql gives a foreignkeyreferencealreadyhasvalueexception.

Do you have any suggestions for my problem?

Thomas




                                          
Pavel Pavlov
Telerik team
 answered on 07 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?