I have a tab control with two tab items in it.It works perfectly in normal style .But when i applied some styles in XAML the tabs are not swtiching and i couldn't select an tab item too why its so?? Below is the style which i applied to tabcontrol
<
Style
TargetType
=
"{x:Type telerik:RadTabItem}"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"{x:Type telerik:RadTabItem}"
>
<
Grid
>
<
Border
Name
=
"Border"
Margin
=
"0,0,2,0"
Background
=
"#828282"
BorderBrush
=
"#828282"
BorderThickness
=
"1"
>
<
ContentPresenter
x:Name
=
"ContentSite"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
ContentSource
=
"Header"
RecognizesAccessKey
=
"True"
/>
</
Border
>
</
Grid
>
<
ControlTemplate.Triggers
>
<
Trigger
Property
=
"IsSelected"
Value
=
"True"
>
<
Setter
Property
=
"Panel.ZIndex"
Value
=
"100"
/>
<
Setter
TargetName
=
"Border"
Property
=
"Background"
Value
=
"#CDCDCD"
/>
<
Setter
TargetName
=
"Border"
Property
=
"BorderBrush"
Value
=
"#CDCDCD"
/>
<
Setter
TargetName
=
"Border"
Property
=
"BorderThickness"
Value
=
"1,1,1,0"
/>
</
Trigger
>
</
ControlTemplate.Triggers
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
and here is the tabcontrol code
<
Grid
>
<
telerik:RadTabControl
Margin
=
"36,10,64,37"
>
<
telerik:RadTabItem
x:Name
=
"RadTabItem"
Header
=
"RadTab 1"
Height
=
"23"
Width
=
"59"
>
<
Grid
Background
=
"Transparent"
>
<
Label
>RadTabItem1</
Label
>
</
Grid
>
</
telerik:RadTabItem
>
<
telerik:RadTabItem
x:Name
=
"RadTabItem2"
Header
=
"RadTab 2"
Height
=
"23"
Width
=
"59"
>
<
Grid
Background
=
"Transparent"
>
<
Label
>RadTabItem2</
Label
>
</
Grid
>
</
telerik:RadTabItem
>
</
telerik:RadTabControl
>
</
Grid
>
Hello,
I'm facing a strange behaviour. PdfViewer prints nothing. Prints only when page is selected as 1 in Print Dialog, if i try the same thing with selecting page 2 (or giving a range) it does nothing. I am binding DocumentSource of pdfviewer to a property on my viewmodel which returns PdfDocumentSource. Pdf is rendered normally.
01.
public
Telerik.Windows.Documents.Fixed.PdfDocumentSource PdfReport
02.
{
03.
get
04.
{
05.
Telerik.Windows.Documents.Fixed.PdfDocumentSource docSource;
06.
var array = Reporting.Pdf.PdfReportHelper.GetReport();
//Dynamically creates the pdf
07.
var output =
new
MemoryStream(array);
08.
docSource =
new
Telerik.Windows.Documents.Fixed.PdfDocumentSource(output);
09.
docSource.Loaded += (sender, args) => {
if
(output !=
null
) output.Dispose();};
10.
return
docSource;
11.
}
12.
}
There is a similar thread like this about winforms wihch suggests to set ReadingMode to 0. I found a reading mode property in formatProviderSettings class but it didn't do the trick. Am i doing something wrong?
Hello,
I have a RadGridView with child RadGridView . Both grids have a GridViewColumn whose visibility I would like to bind to a Property in my Model. This is working for the parent grid, but the child grid isn't in the right DataContext to access the property in my model.
The tables, stripped down for brevity:
<telerik:RadGridView AutoGenerateColumns="False" ItemsSource="{Binding ProductTypes.View}">
<telerik:RadGridView.ChildTableDefinitions>
<telerik:GridViewTableDefinition>
<telerik:GridViewTableDefinition.Relation>
<telerik:PropertyRelation ParentPropertyName="kcc_IncentiveProductTypeChildren" />
</telerik:GridViewTableDefinition.Relation>
</telerik:GridViewTableDefinition>
</telerik:RadGridView.ChildTableDefinitions>
<telerik:RadGridView.Columns>
<telerik:GridViewColumn IsVisible="{Binding DataContext.CanView, ElementName=LayoutRoot}" >
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<Button Content="Delete"/>
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
</telerik:RadGridView.Columns>
<telerik:RadGridView.HierarchyChildTemplate>
<DataTemplate>
<telerik:RadGridView ItemsSource="{Binding kcc_IncentiveProductTypeChildren}" AutoGenerateColumns="False" >
<telerik:RadGridView.Columns>
<telerik:GridViewColumn IsVisible="{Binding DataContext.CanView, ElementName=LayoutRoot}" >
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<Button Content="Delete"/>
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
</DataTemplate>
</telerik:RadGridView.HierarchyChildTemplate>
</telerik:RadGridView>
I need a way to bind to the IsVisible property of the GridViewColumn in the child Grid.
I considered applying a style from my static resources to the GridViewColumn to set the IsVisible property, but GridViewColumn does not have a Style property! I am not sure, but I don't think the other styles (header/footer/cell) will work on this property of the GridViewColumn.
<Style TargetType="telerik:GridViewColumn" x:Key="ViewPermissionColumn">
<Setter Property="IsVisible" Value="{Binding DataContext.CanView, ElementName=LayoutRoot}" />
</Style>
As a last option, I assume I'll need to handle an event on the main grid in order to set this value manually in the code behind. What event would I need?
My use case requires programmatically detecting when a NumericUpDown control is currently being edited, so that we can disallow the user from clicking a button before they've committed their value.
Currently I'm using the Got/LostKeyboardFocus events as well as the setter of the value that the NUD is bound to, but there are many cases in which this approach is insufficient. Ideally, the NUD would have a property I could bind to that would indicate when the NUD is being edited but I haven't found any such thing.
Thanks in advance!
Hello,
I'm having a bit of trouble connecting my mobile device to TestStudio for testing via USB. I can get the machine to read that the device is connected but I'm afraid I'm not able to find the port number of the device hooked up via USB. I'm stuck at this point, I've tried every port number that I could possibly think of... perhaps I'm looking in the wrong place for a port number reference. Any help would be appreciated.
(Device is a Samsung mobile phone)
Hello,
I have a RadComboBox that uses an ItemTemplate to style the content within the dropdown. The ComboBox binds to a "lookup" object that has "Id", "Value", "FG" and "BG" properties. "FG" is the foreground color (string) and "BG" is the background color (string). Value is the display text, and Id is the underlying ID value of the object from the database.
I have the combobox bound to the actual Lookup object, rather than to a primitive, the ItemsSource is bound to another object which is a list of Lookup objects, and I have an item template:
<
DataTemplate
x:Key
=
"lookupColor"
>
<
Label
x:Name
=
"lbl"
Background
=
"{Binding BG}"
Content
=
"{Binding Value}"
Foreground
=
"{Binding FG}"
Margin
=
"0"
>
</
Label
>
</
DataTemplate
>
This works great for a standard combobox. The background is filled in and text color is set properly in both the dropdown, and the items list. But when I try to make the combobox editable, so the user can type the text to quickly select an item, the result shows the <bound class name string> in the textbox for the selected item, instead of the content value binding. I even tried setting the "DisplayMemberPath" to "Value", but still nothing.
I extracted the ComboBox template through expression blend, but there doesn't appear to be any binding on the textbox to control the content, leaving me to think the text is controlled by code.
Any ideas on this?
In my application , i use ShapeStyleSelector to show diference style, the styles is differentiated by the binding object's property, the property may change in app run time, so i need to change the node style dynamic. at present, when user change the property, i remove the node and add one with another style, This is not a good solution
Is any resolution to resole the problem ?