Hi,
I am using WPF , MEF, PRISM and Telerik Components RadGrid , RadDataFilter and RadDataPager with the StyleManager.
The Problem i have is in RadDataFilter .If i open the Filter Criterias the Value for Filter is missing in Fluent Dark and Light . But if i only switch the Theme to Win8 it´s there. The Code of my View is below and some Pictures of the visual Tree are in the Attachments.
Is this a Bug in Fluent Styles or mine in xaml ?
In App.xaml.cs i only switch this 2 block of code to see if there is a Field in Win8 and also in Fluent but i can only find it in Win8 Theme correctly.
//Fluent resources
FluentPalette.LoadPreset(FluentPalette.ColorVariation.Light);
FluentPalette.Palette.FontSizeS = 10;
FluentPalette.Palette.FontSize = 10;
FluentPalette.Palette.FontSizeL = 12;
FluentPalette.Palette.FontSizeXL = 14;
FluentPalette.Palette.FontFamily = new FontFamily("Segoe UI");
FluentPalette.Palette.CornerRadius = new CornerRadius(5);
FluentTheme apptheme = new FluentTheme();
ThemeEffectsHelper.IsAcrylicEnabled = false;
StyleManager.ApplicationTheme = apptheme;
//Windows8Touch resources
//Windows8Palette.Palette.FontSizeS = 8;
//Windows8Palette.Palette.FontSize = 10;
//Windows8Palette.Palette.FontSizeL = 12;
//Windows8Palette.Palette.FontSizeXL = 14;
//Windows8Palette.Palette.FontSizeXXL = 16;
//Windows8Palette.Palette.FontFamily = new FontFamily("Courier New");
//Windows8Palette.Palette.FontFamilyLight = new FontFamily("Courier New");
//Windows8Palette.Palette.FontFamilyStrong = new FontFamily("Courier New");
//StyleManager.ApplicationTheme = new Windows8Theme();
If you look into the visual Tree attached pictures it looks like there is something missing under the "Filter Editor" in Fluent Style compared to the same entry in Win8.
I also tried this Styles with different results.
worked ok with Vista => value field is there with StyleManager.ApplicationTheme = new VistaTheme();
but it´s also missing with => StyleManager.ApplicationTheme = new MaterialTheme();
Any Idea how i can fix this please.
Thanks br
Thomas Cinatl
<UserControl x:Class="MySolutionApplication.Views.LookupListGrid"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:telerikGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
xmlns:Mvvm="clr-namespace:Prism.Mvvm;assembly=Prism.Wpf"
UseLayoutRounding="True" IsEnabled="True"
Mvvm:ViewModelLocator.AutoWireViewModel="True"
mc:Ignorable="d" d:DesignWidth="1022" d:DesignHeight="649"
>
<DockPanel>
<DockPanel.Resources>
<Style x:Key="CenterCheckBoxColumnCellStyle" TargetType="telerik:GridViewCell">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
</Style>
<Style x:Key="GridViewHeaderRowStyle" TargetType="{x:Type telerik:GridViewHeaderCell}">
<Setter Property="Background"
Value="DarkBlue" />
</Style>
</DockPanel.Resources>
<TextBlock x:Name="label" Text="{Binding DisplayName,FallbackValue='Lookup'}" Grid.Row="0" Margin="0" HorizontalAlignment="Stretch" Style="{StaticResource HeaderStyle}" VerticalAlignment="Center"
DockPanel.Dock="Top"/>
<telerik:RadExpander DockPanel.Dock="Top" Header="SEARCH" FontWeight="Bold">
<telerik:RadDataFilter x:Name="radDataFilter" Source="{Binding Items, ElementName=LookupListGridCtrl}" >
</telerik:RadDataFilter>
</telerik:RadExpander>
<telerik:RadGridView x:Name="LookupListGridCtrl" ItemsSource="{Binding Nodes,Mode=TwoWay}" SelectedItem="{Binding Nodes.SelectedUiDataItem,Mode=TwoWay}" Grid.Row="1"
AutoGenerateColumns="false" GroupRenderMode="Flat" NewRowPosition="Top"
CanUserDeleteRows="True" ScrollMode="Deferred" IsSynchronizedWithCurrentItem="True" CanUserResizeColumns="True"
RowIndicatorVisibility="Visible" Margin="0,0,0,1"
IsFilteringAllowed="False">
<telerik:EventToCommandBehavior.EventBindings>
<telerik:EventBinding Command="{Binding CommandProvider.DoDeleteRow}" EventName="Deleted" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
<telerik:EventBinding Command="{Binding CommandProvider.DoInsertRow}" EventName="RowEditEnded" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
<telerik:EventBinding Command="{Binding CommandProvider.DoAddNew}" EventName="AddingNewDataItem" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
<telerik:EventBinding Command="{Binding CommandProvider.DoValidatingCell}" EventName="CellValidating" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
<telerik:EventBinding Command="{Binding CommandProvider.DoValidatingRow}" EventName="RowValidating" RaiseOnHandledEvents="True" PassEventArgsToCommand="True" />
</telerik:EventToCommandBehavior.EventBindings>
<telerik:RadGridView.Columns>
<telerik:GridViewColumn Header="x" Width="30" HeaderTextAlignment="Center" HeaderCellStyle="{DynamicResource GridViewHeaderRowStyle}" IsFilterable="False"
IsGroupable="False" IsReorderable="False" IsSortable="False" IsResizable="False">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<telerik:RadButton Command="telerikGrid:RadGridViewCommands.Delete"
CommandParameter="{Binding}"
telerik:TouchManager.IsTouchHitTestVisible="False">
<Image Height="15" Width="15" Source="/MySolutionApplication;component/Images/DeleteHS.png"/>
</telerik:RadButton>
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
<!-- Compare with : :group_lookup_lkp:ROOT:par_lkp_lookup_lkp:ROOT:par_lkp_group_lookup_lkp:ROOT: -->
<!-- Text: lookup_lkp -->
<telerik:GridViewDataColumn Header="LOOKUP"
DataMemberBinding="{Binding lookup_lkp, Mode=TwoWay}"
Width="90*"
TextAlignment="Left"/>
<!-- Compare with : :group_lookup_lkp:ROOT:par_lkp_lookup_lkp:ROOT:par_lkp_group_lookup_lkp:ROOT: -->
<!-- Compared with : group_lookup_lkp IN :group_lookup_lkp:ROOT:par_lkp_lookup_lkp:ROOT:par_lkp_group_lookup_lkp:ROOT: -->
<!-- Lookup: group_lookup_lkp -->
<telerik:GridViewComboBoxColumn Header="GROUP LOOKUP" Width="180*"
DataMemberBinding="{Binding group_lookup_lkp, Mode=TwoWay}"
DisplayMemberPath="display_nam"
ItemsSource="{Binding Nodes.GroupLookups}"
SelectedValueMemberPath="lookup_lkp"
>
<telerik:GridViewComboBoxColumn.ItemTemplate>
<DataTemplate>
<Grid>
<TextBlock Text="{Binding display_nam}" TextAlignment="Left"/>
</Grid>
</DataTemplate>
</telerik:GridViewComboBoxColumn.ItemTemplate>
</telerik:GridViewComboBoxColumn>
<!-- Ignore NonList: alias_id -->
<!-- Compare with : :group_lookup_lkp:ROOT:par_lkp_lookup_lkp:ROOT:par_lkp_group_lookup_lkp:ROOT: -->
<!-- Compared with : par_lkp_lookup_lkp IN :group_lookup_lkp:ROOT:par_lkp_lookup_lkp:ROOT:par_lkp_group_lookup_lkp:ROOT: -->
<!-- Lookup: par_lkp_lookup_lkp -->
<telerik:GridViewComboBoxColumn Header="PAR LKP LOOKUP" Width="210*"
DataMemberBinding="{Binding par_lkp_lookup_lkp, Mode=TwoWay}"
DisplayMemberPath="display_nam"
ItemsSource="{Binding Nodes.ParLkpLookups}"
SelectedValueMemberPath="lookup_lkp"
>
<telerik:GridViewComboBoxColumn.ItemTemplate>
<DataTemplate>
<Grid>
<TextBlock Text="{Binding display_nam}" TextAlignment="Left"/>
</Grid>
</DataTemplate>
</telerik:GridViewComboBoxColumn.ItemTemplate>
</telerik:GridViewComboBoxColumn>
<!-- Compare with : :group_lookup_lkp:ROOT:par_lkp_lookup_lkp:ROOT:par_lkp_group_lookup_lkp:ROOT: -->
<!-- Compared with : par_lkp_group_lookup_lkp IN :group_lookup_lkp:ROOT:par_lkp_lookup_lkp:ROOT:par_lkp_group_lookup_lkp:ROOT: -->
<!-- Lookup: par_lkp_group_lookup_lkp -->
<telerik:GridViewComboBoxColumn Header="PAR LKP GROUP LOOKUP" Width="300*"
DataMemberBinding="{Binding par_lkp_group_lookup_lkp, Mode=TwoWay}"
DisplayMemberPath="display_nam"
ItemsSource="{Binding Nodes.ParLkpGroupLookups}"
SelectedValueMemberPath="lookup_lkp"
>
<telerik:GridViewComboBoxColumn.ItemTemplate>
<DataTemplate>
<Grid>
<TextBlock Text="{Binding display_nam}" TextAlignment="Left"/>
</Grid>
</DataTemplate>
</telerik:GridViewComboBoxColumn.ItemTemplate>
</telerik:GridViewComboBoxColumn>
<!-- Ignore NonList: external_uri -->
<!-- Ignore NonList: customized_flg -->
<!-- Compare with : :group_lookup_lkp:ROOT:par_lkp_lookup_lkp:ROOT:par_lkp_group_lookup_lkp:ROOT: -->
<!-- Text: display_nam -->
<telerik:GridViewDataColumn Header="DISPLAY"
DataMemberBinding="{Binding display_nam, Mode=TwoWay}"
Width="120*"
TextAlignment="Left"/>
<!-- Compare with : :group_lookup_lkp:ROOT:par_lkp_lookup_lkp:ROOT:par_lkp_group_lookup_lkp:ROOT: -->
<!-- Text: display_short_txt -->
<telerik:GridViewDataColumn Header="DISPLAY SHORT"
DataMemberBinding="{Binding display_short_txt, Mode=TwoWay}"
Width="195*"
TextAlignment="Left"/>
<!-- Ignore NonList: report_txt -->
<!-- Ignore NonList: description_txt -->
<!-- Ignore Audit: create_user -->
<!-- Ignore Audit: create_date -->
<!-- Ignore Audit: modify_user -->
<!-- Ignore Audit: modify_date -->
<!-- Ignore Audit: valid_from -->
<!-- Ignore Audit: valid_to -->
<!-- Ignore Audit: deleted_yn -->
<!-- Compare with : :group_lookup_lkp:ROOT:par_lkp_lookup_lkp:ROOT:par_lkp_group_lookup_lkp:ROOT: -->
<!-- Flag: valid_yn -->
<telerik:GridViewCheckBoxColumn Header="VALID" DataMemberBinding="{Binding IsValidYn, Mode=TwoWay}" AutoSelectOnEdit="True" EditTriggers="CellClick" Width="75*" >
<telerik:GridViewCheckBoxColumn.CellStyle>
<Style TargetType="telerik:GridViewCell" BasedOn="{StaticResource CenterCheckBoxColumnCellStyle}">
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
</telerik:GridViewCheckBoxColumn.CellStyle>
</telerik:GridViewCheckBoxColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
<telerik:RadDataPager PageSize="20"
Grid.Row="2" FontSize="12" Margin="0,-1,0,0"
Source="{Binding Items, ElementName=LookupListGridCtrl}"
IsTotalItemCountFixed="True"
DisplayMode="FirstLastPreviousNextNumeric, Text" />
<!--</Grid>-->
</DockPanel>
</UserControl>
Hi
We're using a WPF RadWindow to customize a titlebar with an image and keeping the other behaviors and we application is used in one or two monitors.
After implementation, when restore and maximize in the second monitor, the window's height override the taskbar and exceeds the second monitor and show the RadWindow in the primary monitor.
How correct this problem?
Best Regards
Pierre Voigt
OBS:
* The second monitor is above the primary monitor.
* The telerik's version is 2018.1.220.45.
* We're using the Fluent theme.
* Sample:
MainWindow.xaml.cs
01.
using
Telerik.Windows.Controls;
02.
03.
namespace
RadWindowSample
04.
{
05.
public
partial
class
MainWindow : RadWindow
06.
{
07.
public
MainWindow()
08.
{
09.
InitializeComponent();
10.
}
11.
}
12.
}
MainWindow.xaml
01.
<
telerik:RadWindow
x:Class
=
"RadWindowSample.MainWindow"
03.
xmlns:x
=
"http://schemas.microsoft.com/winfx/2006/xaml"
04.
xmlns:d
=
"http://schemas.microsoft.com/expression/blend/2008"
05.
xmlns:mc
=
"http://schemas.openxmlformats.org/markup-compatibility/2006"
06.
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
07.
xmlns:local
=
"clr-namespace:RadWindowSample"
08.
mc:Ignorable
=
"d"
09.
MinHeight
=
"600"
10.
MaxHeight
=
"900"
11.
MinWidth
=
"900"
12.
WindowState
=
"Maximized"
13.
Height
=
"450"
Width
=
"800"
>
14.
<
Grid
>
15.
16.
</
Grid
>
17.
</
telerik:RadWindow
>
App.xaml.cs
01.
using
System.Windows;
02.
03.
namespace
RadWindowSample
04.
{
05.
public
partial
class
App : Application
06.
{
07.
protected
override
void
OnStartup(StartupEventArgs e)
08.
{
09.
var mainWindow =
new
MainWindow();
10.
mainWindow.Show();
11.
base
.OnStartup(e);
12.
}
13.
}
14.
}
App.xaml
01.
<
Application
x:Class
=
"RadWindowSample.App"
03.
xmlns:x
=
"http://schemas.microsoft.com/winfx/2006/xaml"
04.
xmlns:local
=
"clr-namespace:RadWindowSample"
05.
>
06.
<
Application.Resources
>
07.
<
ResourceDictionary
>
08.
<
ResourceDictionary.MergedDictionaries
>
09.
<!--Telerik.Windows.Controls is used by all assemblies -->
10.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.xaml"
/>
11.
12.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/System.Windows.xaml"
/>
13.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Input.xaml"
/>
14.
15.
<!-- Requires: System.Windows.xaml -->
16.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Navigation.xaml"
/>
17.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Chart.xaml"
/>
18.
19.
<!-- Requires: Telerik.Windows.Controls.Input -->
20.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Data.xaml"
/>
21.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.DataVisualization.xaml"
/>
22.
23.
<!-- Requires: Telerik.Windows.Controls.Navigation -->
24.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Docking.xaml"
/>
25.
26.
<!-- Requires: Telerik.Windows.Controls.Input -->
27.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.GridView.xaml"
/>
28.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.ImageEditor.xaml"
/>
29.
30.
<!-- Requires: Telerik.Windows.Controls.Input, Telerik.Windows.Controls.Navigation -->
31.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.RibbonView.xaml"
/>
32.
<!--<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.RibbonView.xaml" />-->
33.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Diagrams.xaml"
/>
34.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Diagrams.Extensions.xaml"
/>
35.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Documents.xaml"
/>
36.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Spreadsheet.xaml"
/>
37.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.GanttView.xaml"
/>
38.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Pivot.xaml"
/>
39.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.PivotFieldList.xaml"
/>
40.
41.
<!-- Used for PdfViewerControl -->
42.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.FixedDocumentViewers.xaml"
/>
43.
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.FixedDocumentViewersUI.xaml"
/>
44.
</
ResourceDictionary.MergedDictionaries
>
45.
<
Style
TargetType
=
"local:MainWindow"
BasedOn
=
"{StaticResource RadWindowStyle}"
/>
46.
</
ResourceDictionary
>
47.
</
Application.Resources
>
48.
</
Application
>
I need to set checkbox into GridView checkboxcolumn header to implement "Select all" functionallity.
In wpf DataGrid it was simple i could set HeaderColumnTemplate property in xaml and bind to a DataGrid ViewModel object property. Unfortuantly I could not find simillar property or a way to to implement the functionality i need.
Hello Telerik,
I'm working with a RadDiagram.
In my case, I have a red rectangle to show to user the limit of the diagram. If he moves a Shape outside of the red rectangle body, we replace the shape inside the rectangle (with an algorithm).
For all shape types, is working find, but not for RadDiagramConnection.
My sub :
Private
Sub
MoveShape(p_shape
As
RadDiagramItem)
If
(p_shape
Is
Nothing
)
Then
Exit
Sub
If
Me
._moveShapeCount >= 8
Then
'Used to fix a bug with infinite loop (StackOverFlowException) !
Me
._moveShapeCount = 0
Exit
Sub
End
If
Try
'Memory
Dim
shapeAsRectangle
As
Rect = p_shape.GetActualBounds()
'Used to have the good values when shape is rotated
Dim
isRectangleRotated
As
Boolean
=
False
Dim
isShapePositionModified
As
Boolean
=
False
'Rotation management
If
TryCast(p_shape, RadDiagramShape) IsNot
Nothing
Then
'Image / Elipse
isRectangleRotated = (
Not
ListMissOutAngles.Exists(
Function
(a) a =
DirectCast
(p_shape, RadDiagramShape).RotationAngle))
ElseIf
TryCast(p_shape, RadDiagramConnection) IsNot
Nothing
Then
'Me.ReplaceConnectorShape(p_shape) 'Specific treatment because Connection not has rotation angle and can have 2 points inside the line
'Exit Sub
ElseIf
TryCast(p_shape, RadDiagramTextShape) IsNot
Nothing
Then
'Boite de texte
isRectangleRotated = (
Not
ListMissOutAngles.Exists(
Function
(a) a =
DirectCast
(p_shape, RadDiagramTextShape).RotationAngle))
Else
'Kc / Gap / Ref / Calculation / Adiru / FSI
isRectangleRotated = (
Not
ListMissOutAngles.Exists(
Function
(a) a =
DirectCast
(p_shape, RadDiagramShapeBase).RotationAngle))
End
If
'Width management
If
p_shape.Bounds.Width < (MinX +
Me
.BoundariesWidth)
Then
'Manage cases only if shape width is < to red rectangle width (infinite loop risk)
If
shapeAsRectangle.Left < MinX
Then
If
isRectangleRotated
Then
p_shape.Position =
New
Point((p_shape.Bounds.X + (MinX - shapeAsRectangle.Left)), p_shape.Bounds.Y)
Else
p_shape.Position =
New
Point((MinX + 2), p_shape.Bounds.Y)
End
If
isShapePositionModified =
True
End
If
If
shapeAsRectangle.Right > (MinX + BoundariesWidth)
Then
p_shape.Position =
New
Point((p_shape.Bounds.X + ((
Me
.BoundariesWidth + MinX) - shapeAsRectangle.Right)), p_shape.Bounds.Y)
isShapePositionModified =
True
End
If
Else
Exit
Sub
End
If
'Height management
If
p_shape.Bounds.Height < (MinY + BoundariesHeight)
Then
'Manage cases only if shape height is < to red rectangle height (infinite loop risk)
If
shapeAsRectangle.Top < MinY
Then
If
isRectangleRotated
Then
p_shape.Position =
New
Point(p_shape.Bounds.X, (p_shape.Bounds.Y + (MinY - shapeAsRectangle.Top)))
Else
p_shape.Position =
New
Point(p_shape.Bounds.X, (MinY + 2))
End
If
isShapePositionModified =
True
End
If
If
shapeAsRectangle.Bottom > (MinY + BoundariesHeight)
Then
If
isRectangleRotated
Then
p_shape.Position =
New
Point(p_shape.Bounds.X, (p_shape.Bounds.Top - (shapeAsRectangle.Bottom - BoundariesHeight) + MinY))
Else
p_shape.Position =
New
Point(p_shape.Bounds.X, (p_shape.Bounds.Y - (p_shape.Bounds.Bottom - (MinY + BoundariesHeight)) - 2))
End
If
isShapePositionModified =
True
End
If
Else
Exit
Sub
End
If
If
isShapePositionModified
Then
Me
._moveShapeCount += 1
Me
.MoveShape(p_shape)
End
If
Catch
ex
As
Exception
If
Debugger.IsAttached
Then
Debugger.Break()
MAATrace.Log(
"MoveShape EXCEPTION"
,
"Error in MoveShape() (top-left position : '"
+ p_shape.Position.ToString() +
"') : "
+ ex.Message)
End
Try
End
Sub
For example, consider the first case => If shapeAsRectangle.Left < MinX
For all shapes, the p_shape.Position is set to 22, but for RadDiagramConnection, the value is not updated.
Do you know why the position is not updated for RadDiagramConnection ? And how can I resolve it ?
Furthermore, I should to be able to know if there is a rotation for the shape which encircle the RadDiagramConnection (the If, elseif, elseif... is a draft copy)
Thanks a lot.
I'm not able to get Dragon select drop-down options.
<telerik:RadComboBox Grid.Row="5" Grid.Column="1" Padding="1" Grid.ColumnSpan="3" Name="SearchComboBox"
AutomationProperties.Name="Search:"
MaxHeight="20"
MinWidth="270"
VerticalAlignment="Center"
IsEditable="True"
IsReadOnly="False"
CanAutocompleteSelectItems="False"
CanKeyboardNavigationSelectItems="False"
IsTextSearchEnabled="False"
StaysOpenOnEdit="False"
OpenDropDownOnFocus="False"
IsMouseWheelEnabled="True"
MaxDropDownHeight="200"
Focusable="True"
IsTabStop="True"
TabIndex="101"
ItemTemplate="{StaticResource GridLikeDataTemplate}"
TextBoxStyle="{StaticResource CustomComboTextBoxStyle}"
ItemsSource="{Binding List}"
KeyDown="General_KeyDown"
ScrollViewer.ScrollChanged="SearchCombo_ScrollChanged"
TextBoxBase.TextChanged="SearchCombo_TextChanged"
SelectionChanged="SearchCombo_SelectionChanged" >
<!--<telerikPresentation:RadComboBox.ItemContainerStyle>
<Style TargetType="{x:Type telerikPresentation:RadComboBoxItem}">
<Setter Property="AutomationProperties.Name" Value="{Binding Name}"/>
</Style>
</telerikPresentation:RadComboBox.ItemContainerStyle>-->
</telerik:RadComboBox>
Template:
<DataTemplate x:Key="GridLikeDataTemplate">
<DockPanel DataContext="{Binding}">
<TextBlock Width="150" DockPanel.Dock="Right" Foreground="Gray" Text="{Binding TypeName}" Margin="0,0,15,0" />
<TextBlock Text="{Binding Name}" FontWeight="Bold" Margin="0,0,20,0" AutomationProperties.Name="{Binding Name}"/>
</DockPanel>
</DataTemplate>
I used Inspect.exe and verified that the "Name" property was set propertly, but Click <PROPERTY NAME> is not working. Please let me know if there is anything I missed. Thank you in advance.
Does anybody know if the results from sibling aggregate functions can be used as input values for another function?
I would like to display the following grid:
Day 1
Aggr1 Aggr2 Diff
Shop v1 v2 v1-v2
Item A p1A p2A
Item B p1B p2B
Is there any way to access the Aggr1 and Aggr 2 results in the Diff aggregate?
<
telerik:RadRibbonGroup
Header
=
"Display X/Y in"
FontSize
=
"13"
>
<
telerik:RadCollapsiblePanel
>
<
telerik:RadRibbonRadioButton
x:Name
=
"MapCoordinates"
IsChecked
=
"{Binding MapCoordinatesChecked}"
CollapseToSmall
=
"WhenGroupIsSmall"
CollapseToMedium
=
"WhenGroupIsMedium"
telerik:ScreenTip.Description
=
"Map Coordinates"
telerik:ScreenTip.Title
=
"Map Coordinates"
Size
=
"Large"
Text
=
"Map Coordinates"
Command
=
"{Binding RibbonControlRadioButtonClickedCommand}"
CommandParameter
=
"{Binding ElementName=MapCoordinates}"
SmallImage
=
"Resources\MapCoordinates.png"
LargeImage
=
"Resources\MapCoordinates.png"
/>
</
telerik:RadCollapsiblePanel
>
</
telerik:RadRibbonGroup
>
Kindly let me know, how can I bind its command in MVVM architecture.
Regards,
Tayyaba
The recorded on-demand training videos will be available in Your Account shortly after the corresponding live training is complete and all training sessions will be refreshed after each major release.
I created a test application that works like I want it to. However now that I am trying to implement it the same way into an existing application, the opacity value I am setting is being ignored. This complexity of this custom control (using a RadCartesianChart) is pretty crazy. I just can't find out what is causing it to ignore what I am setting.
Attached is what the chart looks like without and with mouse-overing a LineSeries. The idea is to highlight the LineSeries the trackball is describing.
Below is how I am setting the opacity in a custom behavior. I have even tried
- setting the opacity of each series on the RadCartesianChart itself
- setting the opacity on the style being used for the LineSeries
- setting up a style trigger to set the opacity value when the IsSelected property is modified in the behavior
Does anyone have an ideas?
01.
private
static
void
ChartTrackBallBehavior_TrackInfoUpdated(
object
sender, TrackBallInfoEventArgs e)
02.
{
03.
ChartDataContext context = e.Context;
04.
05.
DataPointInfo closestDataPointInfo = context.DataPointInfos
06.
.OrderBy(x => Math.Abs(e.Context.TouchLocation.Y - x.DataPoint.LayoutSlot.Y)).FirstOrDefault();
07.
08.
foreach
(DataPointInfo dataPointInfo
in
context.DataPointInfos)
09.
{
10.
if
(dataPointInfo == closestDataPointInfo)
11.
{
12.
if
(dataPointInfo?.DataPoint.DataItem
is
ChartItem chartItem)
13.
{
14.
ChildChartViewModel childChartViewModel = dataPointInfo.Series.Chart.DataContext
as
ChildChartViewModel;
15.
16.
string
time = chartItem.XValue.ToString(childChartViewModel?.LabelFormat ??
string
.Empty);
17.
string
value = chartItem.YValue.ToString(childChartViewModel?.VerticalAxis.DataFormatString ??
string
.Empty);
18.
19.
dataPointInfo.DisplayContent = $
"({time}, {value})"
;
20.
dataPointInfo.Series.Opacity = 1;
21.
dataPointInfo.Series.Tag =
"Add"
;
22.
}
23.
}
24.
else
25.
{
26.
dataPointInfo.Series.Opacity = 0.33;
27.
dataPointInfo.Series.Tag =
"Remove"
;
28.
}
29.
}
30.
31.
e.Context.DataPointInfos.RemoveAll(x => x.Series.Tag.ToString() ==
"Remove"
);
32.
}
I have the following radgridview. In the alert column the filter takes out a 0 or a 1, which is the data that is collected from the database.
How could I change 0 for no alert and 1 for alert?
Thank you very much
<
telerik:RadGridView
Name
=
"rgvExplorador"
GridLinesVisibility
=
"Both"
GroupPanelBackground
=
"LightGray"
GroupPanelForeground
=
"Black"
ShowSearchPanel
=
"True"
ShowGroupPanel
=
"False"
d:LayoutOverrides
=
"Height"
Grid.Row
=
"1"
FontSize
=
"10.667"
CanUserResizeColumns
=
"False"
CanUserFreezeColumns
=
"False"
AutoGenerateColumns
=
"False"
SelectionMode
=
"Single"
ItemsSource
=
"{Binding}"
RowIndicatorVisibility
=
"Collapsed"
>
<
telerik:RadGridView.GroupDescriptors
>
<
telerik:GroupDescriptor
Member
=
"areaTexto"
SortDirection
=
"Ascending"
/>
<
telerik:GroupDescriptor
Member
=
"clasificacionTexto"
SortDirection
=
"Ascending"
/>
</
telerik:RadGridView.GroupDescriptors
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Área"
DataMemberBinding
=
"{Binding areaTexto}"
Width
=
"70"
IsReadOnly
=
"True"
IsGroupable
=
"True"
IsVisible
=
"False"
/>
<
telerik:GridViewDataColumn
Header
=
"Clasificación"
DataMemberBinding
=
"{Binding clasificacionTexto}"
Width
=
"140"
IsReadOnly
=
"True"
IsGroupable
=
"True"
IsVisible
=
"False"
/>
<
telerik:GridViewDataColumn
Header
=
"Título"
DataMemberBinding
=
"{Binding descripcion}"
IsReadOnly
=
"True"
TextWrapping
=
"Wrap"
Width
=
"300"
>
<
telerik:GridViewColumn.ToolTipTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Vertical"
Width
=
"300"
MinHeight
=
"80"
Background
=
"White"
>
<
TextBlock
Text
=
"Descripción:"
FontWeight
=
"Bold"
/>
<
TextBlock
Text
=
"{Binding Objetivo}"
TextWrapping
=
"Wrap"
/>
</
StackPanel
>
</
DataTemplate
>
</
telerik:GridViewColumn.ToolTipTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"Nº"
DataMemberBinding
=
"{Binding IdAlerta}"
IsReadOnly
=
"True"
Width
=
"auto"
IsGroupable
=
"True"
/>
<
telerik:GridViewDataColumn
x:Name
=
"colHV"
Header
=
"Info dimensional"
DataMemberBinding
=
"{Binding HvInfoDesc}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
x:Name
=
"colPatron"
Header
=
"Patrón"
DataMemberBinding
=
"{Binding HF_Referencia}"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Período"
DataMemberBinding
=
"{Binding FechaDatos}"
DataFormatString
=
"{}{0:MMM/yyyy}"
Width
=
"70"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Entidad"
DataMemberBinding
=
"{Binding Entidad}"
IsReadOnly
=
"True"
Width
=
"70"
/>
<
telerik:GridViewDataColumn
IsReadOnly
=
"True"
Width
=
"30"
DataMemberBinding
=
"{Binding EsAlerta}"
IsGroupable
=
"True"
ShowDistinctFilters
=
"True"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
Image
>
<
Image.Style
>
<
Style
TargetType
=
"{x:Type Image}"
>
<
Setter
Property
=
"Source"
Value
=
"/Mercvrio.Style;component/Images/Blank.png"
/>
<
Style.Triggers
>
<
DataTrigger
Value
=
"1"
Binding
=
"{Binding EsAlerta}"
>
<
Setter
Property
=
"Source"
Value
=
"/Mercvrio.Style;component/Images/WarningRed.png"
/>
</
DataTrigger
>
<
DataTrigger
Value
=
"1"
Binding
=
"{Binding AlertaPositiva}"
>
<
Setter
Property
=
"Source"
Value
=
"/Mercvrio.Style;component/Images/Warning.png"
/>
</
DataTrigger
>
<
DataTrigger
Value
=
"0"
Binding
=
"{Binding EsAlerta}"
>
<
Setter
Property
=
"Source"
Value
=
"/Mercvrio.Style;component/Images/Blank.png"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
</
Image.Style
>
</
Image
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>