telerik:RadExpander Name="radTest" Header="Test1 " Height="150" Width="500" IsExpanded="False" HorizontalAlignment="Left" ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible">
<Image Source= "Agent.png" Height=" 300" Width="700"> </Image>
</telerik:RadExpander>
<
telerik:RadMaskedNumericInput
x:Name
=
"_numberOfPages"
Margin
=
"2"
Grid.Column
=
"4"
Grid.Row
=
"2"
MinWidth
=
"60"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Stretch"
Mask
=
"d"
FormatString
=
"D2"
TextMode
=
"MaskedText"
AllowInvalidValues
=
"False"
MaskedInput:MaskedInputExtensions.Minimum
=
"0"
SelectionOnFocus
=
"SelectAll"
ErrorMessage
=
"Invalid number of pages"
Value
=
"{Binding ProjectListItemViewModel.SettableNumberOfPages, Mode=TwoWay, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, NotifyOnValidationError=True}"
Style
=
"{StaticResource RadMaskedNumericInputStyle}"
/>
<
ControlTemplate
TargetType
=
"{x:Type Control}"
x:Key
=
"ValidationErrorTemplate"
>
<
DockPanel
LastChildFill
=
"true"
>
<
Border
BorderBrush
=
"{StaticResource ErrorBrush}"
BorderThickness
=
"3"
Panel.ZIndex
=
"999"
Background
=
"White"
DockPanel.Dock
=
"right"
Margin
=
"-8,0,0,0"
Width
=
"16"
Height
=
"16"
CornerRadius
=
"10"
ToolTip
=
"{Binding ElementName=customAdorner, Path=AdornedElement.(Validation.Errors)[0].ErrorContent}"
>
<
Rectangle
Fill
=
"{StaticResource ErrorBrush}"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Center"
Height
=
"3"
RenderTransformOrigin
=
"0.5,0.5"
>
<
Rectangle.RenderTransform
>
<
RotateTransform
Angle
=
"315"
/>
</
Rectangle.RenderTransform
>
</
Rectangle
>
</
Border
>
<
AdornedElementPlaceholder
Name
=
"customAdorner"
VerticalAlignment
=
"Center"
>
<
Border
BorderBrush
=
"{StaticResource ErrorBrush}"
BorderThickness
=
"1"
/>
</
AdornedElementPlaceholder
>
</
DockPanel
>
</
ControlTemplate
>
<
Style
TargetType
=
"{x:Type Controls:RadMaskedNumericInput}"
x:Key
=
"RadMaskedNumericInputStyle"
>
<
Setter
Property
=
"FontFamily"
Value
=
"Calibri"
/>
<
Setter
Property
=
"FontSize"
Value
=
"12"
/>
<
Setter
Property
=
"SelectionOnFocus"
Value
=
"CaretToEnd"
/>
<
Setter
Property
=
"Validation.ErrorTemplate"
Value
=
"{StaticResource ValidationErrorTemplate}"
/>
<
Setter
Property
=
"HorizontalContentAlignment"
Value
=
"Left"
/>
<
Style.Triggers
>...
</
Style.Triggers
>
</
Style
>
<Style x:Key="Group" TargetType="telerik:RadSplitButton">
</i:Interaction.Behaviors>
<telerik:RadMenuItem Header="{x:Static Properties:Resources.Group_Header}" cal:Message.Attach="ToggleGroupBySetting('Cluster')" IsCheckable="True" StaysOpenOnClick="False" IsChecked="{Binding DocumentGrouping, Converter={StaticResource GroupedMenuItemsConverter}, ConverterParameter=Cluster, Mode=TwoWay}" ><telerik:RadMenuItem.Icon>
<Image Height="24" Width="16" Source="..\..\Images\cluster.png" />
<
telerik:RadSplitButton x:Name="Group" Style="{StaticResource Group}" />
{
RadMenuItem menuItem = sender as RadMenuItem;
if(menuItem == null)
{
Debug.Assert(false, @"Unexpected object type.");return;
}
if(menuItem.Items.Count > 0){
// normally, menu items with child menu items
// if an item in its sub-menu has StaysOpenOnClick set
}
if(menuItem.StaysOpenOnClick)
{
// honor 'StaysOpenOnClick' behavior
return;
}
RadDropDownButton dropDownButton = menuItem.ParentOfType<RadDropDownButton>();
if (dropDownButton != null)
{
dropDownButton.IsOpen = false;
}
else
{
RadSplitButton splitButton = menuItem.ParentOfType<RadSplitButton>();
if (splitButton != null)
{
splitButton.IsOpen = false;
}
else
{
Debug.Assert(false, @"Cannot find parent RadDropDownButton or RadSplitButton.");
}
}
}
I want the dropdown to be closed when clicked outside the control when the menu item with submenu is expanded.Please help me to resolve this issue
Thanks
Rakesh
How do I change the line color of a chart series when using a ChartSeriesProvider?
If I'm not using the ChartSeriesProvider, then I do this by setting the "Stroke" property,
as illustrated here. This works:
<
telerik:ScatterLineSeries
Name
=
"HeadSeries"
ItemsSource
=
"{Binding Path=DataPoints}"
XValueBinding
=
"FlowRate"
YValueBinding
=
"Head"
PointTemplate
=
"{StaticResource HeadPointTemplate}"
Stroke
=
"CornflowerBlue"
>
</
telerik:ScatterLineSeries
>
However, if use the ChartSeriesProvider, the following snippet does not change the line color.
<
telerik:ScatterSeriesDescriptor
ItemsSourcePath
=
"Item"
XValuePath
=
"FlowRate"
YValuePath
=
"Head"
>
<
telerik:ScatterSeriesDescriptor.Style
>
<
Style
TargetType
=
"telerik:ScatterLineSeries"
>
<
Setter
Property
=
"PointTemplate"
Value
=
"{StaticResource HeadPointTemplate}"
/>
<
Setter
Property
=
"Stroke"
Value
=
"CornflowerBlue"
/>
</
Style
>
</
telerik:ScatterSeriesDescriptor.Style
>
</
telerik:ScatterSeriesDescriptor
>
public
class
MapItem : INotifyPropertyChanged
{
#region INotifyPropertyChanged Members
void
OnPropertyChanged(
string
prop)
{
if
(
this
.PropertyChanged !=
null
)
this
.PropertyChanged(
this
,
new
PropertyChangedEventArgs(prop));
}
public
event
PropertyChangedEventHandler PropertyChanged;
private
void
button1_Click(
object
sender, RoutedEventArgs e)
{
foreach
(MapItem item
in
infLayerMovingObjects.ItemsSource)
{
Location loc = item.Location;
loc.Latitude += 0.001;
loc.Longitude += 0.001;
item.Location = loc;
}
}
Hi,
I have one problem with Fluid Content Control.
I've read the documentation of RadTileView and i've read the "Fluid Content Control" article
(http://www.telerik.com/help/silverlight/radtileview-fluid-content-control.html).
My problem is in this code :
private
void
tivSessions_TileStateChanged(
object
sender, Telerik.Windows.RadRoutedEventArgs e)
{
RadTileViewItem item = e.OriginalSource
as
RadTileViewItem;
if
(item !=
null
)
{
// THIS DOESN'T WORK
RadFluidContentControl fluidControl = item.Content
as
RadFluidContentControl;
// Can't cast item.Content in RadFluidContentControl.
if
(fluidControl !=
null
)
{
switch
(item.TileState)
{
case
TileViewItemState.Maximized:
fluidControl.State = FluidContentControlState.Large;
break
;
case
TileViewItemState.Minimized:
fluidControl.State = FluidContentControlState.Small;
break
;
case
TileViewItemState.Restored:
fluidControl.State = FluidContentControlState.Normal;
break
;
}
}
}
}
item.Content is actually my databind object.
I just can't get the RadFluidContent.
Here is my XAML :
<
Window
x:Class
=
"PDCBrowser.MainWindow"
xmlns:Telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
Title
=
"MainWindow"
Loaded
=
"Window_Loaded"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
ComboBox
Name
=
"cbbTracks"
DisplayMemberPath
=
"TrackId"
SelectedValuePath
=
"TrackId"
/>
<
Telerik:RadTileView
Name
=
"tivSessions"
TileStateChanged
=
"tivSessions_TileStateChanged"
Grid.Row
=
"1"
ItemsSource
=
"{Binding ElementName=cbbTracks, Path=SelectedItem}"
>
<
Telerik:RadTileView.ItemTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding ShortTitle}"
TextWrapping
=
"WrapWithOverflow"
></
TextBlock
>
</
DataTemplate
>
</
Telerik:RadTileView.ItemTemplate
>
<
Telerik:RadTileView.ContentTemplate
>
<
DataTemplate
>
<
Telerik:RadFluidContentControl
ContentChangeMode
=
"Manual"
>
<
Telerik:RadFluidContentControl.SmallContent
>
<
TextBlock
>SMALL</
TextBlock
>
</
Telerik:RadFluidContentControl.SmallContent
>
<
Telerik:RadFluidContentControl.Content
>
<
TextBlock
>MEDIUM</
TextBlock
>
</
Telerik:RadFluidContentControl.Content
>
<
Telerik:RadFluidContentControl.LargeContent
>
<
TextBlock
>LARGE</
TextBlock
>
</
Telerik:RadFluidContentControl.LargeContent
>
</
Telerik:RadFluidContentControl
>
</
DataTemplate
>
</
Telerik:RadTileView.ContentTemplate
>
</
Telerik:RadTileView
>
</
Grid
>
</
Window
>
Any ideas ?
Regards.