private void rtSummaryInfo_RowLoaded(object sender, RowLoadedEventArgs e)
{
TreeListViewRow
lobjTreeListViewRow = (e.Row as Telerik.Windows.Controls.TreeListView.TreeListViewRow);
SummaryData lobjSummaryData = (e.Row as Telerik.Windows.Controls.TreeListView.TreeListViewRow).DataContext as SummaryData;
if (_lstExpandedNode.Contains(lobjSummaryData.NodeName))
{
lobjTreeListViewRow.IsExpanded =
true; // at this point, scrollviewer gets resets
}
}
I need to maintain the scroll position while expanding a node. Your help is appreciated.
According to their documentation “Link below” to set their date time picker to military time you have to create a new culture. We are using the culture below, as you can see from the screen shot it got it half way right but I think it would be better without the AM & PM after it.I attached a screen shot of the clock. We just want to remove the AM and PM.
CultureInfo cultureInfo = new CultureInfo("en-US");
cultureInfo.DateTimeFormat.ShortTimePattern = "H:mm";
cultureInfo.DateTimeFormat.LongTimePattern = "H:mm";
cultureInfo.DateTimeFormat.PMDesignator = "";
cultureInfo.DateTimeFormat.AMDesignator = "";
http://www.telerik.com/help/wpf/raddatetimepicker-features-formatting.html
<
UserControl.Resources
>
<
Helpers:RequiredValueStyleSelector
x:Key
=
"RequiredFieldStyleSelector"
/>
<
Style
TargetType
=
"telerik:GridViewDataColumn"
>
<
Setter
Property
=
"CellStyleSelector"
Value
=
"{StaticResource RequiredFieldStyleSelector}"
/>
</
Style
>
</
UserControl.Resources
>
within our User Control
all is working as expected but if comment this in usercontrol out and put the same code
<
Helpers:RequiredValueStyleSelector
x:Key
=
"RequiredFieldStyleSelector"
/>
<
Style
TargetType
=
"telerik:GridViewDataColumn"
>
<
Setter
Property
=
"CellStyleSelector"
Value
=
"{StaticResource RequiredFieldStyleSelector}"
/>
</
Style
>
into generic.xaml nothing happens
Any suggestions?
PS. in Helper.dll attributes look like
[assembly: ThemeInfo(
ResourceDictionaryLocation.None,
ResourceDictionaryLocation.SourceAssembly
)]
public
Dictionary<
string
,
string
> MyTypes
{
get
{
return
myTypes; }
}
public
void
InitializeCriteria(SelectionCriteria criteria)
{
var culture = Thread.CurrentThread.CurrentUICulture.ToString();
base
.InitializeStandardSelectionCriteria(criteria, culture);
// Load the Types
var mTypes = MyTypes.Select(c =>
new
Tuple<
string
,
string
>(c.Key, c.Value));
Array.ForEach(mTypes.ToArray(), criteria.MyTypes.Add);
var defaultMyType = criteria.MyTypes.FirstOrDefault();
if
(defaultMyType !=
null
)
{
criteria.MyTypes= defaultMyType .Item1;
}
}
protected
override
void
OnInitialize(ESEntities entities)
{
base
.OnInitialize(entities);
LoadMyTypes(entities);
LoadSomeOtherData(entities);
}
private
void
LoadMyTypes(ESEntities entities)
{
myTypes =
new
Dictionary<
string
,
string
>()
{
{
""
, Resources.Resources.NoneLabel },
{
"D"
, Resources.Resources.DMessage },
{
"F"
, Resources.Resources.FMessage},
{
"H"
, Resources.Resources.HMessage },
{
"I"
, Resources.Resources.IMessage },
{
"L"
, Resources.Resources.LMessage } };
}
<
GroupBox
x:Name
=
"LGroup"
Header
=
"{x:Static Resources:Resources.OptionsL}"
>
<
telerik:RadComboBox
x:Name
=
"attenuationComboBox"
ToolTip
=
"{x:Static Resources:Resources.OptionsDesired}"
Height
=
"23"
VerticalAlignment
=
"Top"
ItemsSource="{Binding Criteria.MyTypes,
Mode
=
OneWay
,
NotifyOnSourceUpdated
=
True
,
NotifyOnTargetUpdated
=
True
,
UpdateSourceTrigger
=
PropertyChanged
}"
SelectedValue
=
"{Binding Criteria.MyType, Mode=TwoWay}"
IsEnabled
=
"{Binding SelectionOptions.CEnabled}"
DisplayMemberPath
=
"Item2"
SelectedValuePath
=
"Item1"
/>
</
GroupBox
>
<DataTemplate x:Key="AppointmentItemContentTemplate"> <Grid> <Border> <Border.Style> <Style> <Style.Triggers> <DataTrigger Binding="{Binding ProductCategory}" Value="Building"> <Setter Property="Border.Background" Value="CornflowerBlue"></Setter> </DataTrigger> </Style.Triggers> </Style> </Border.Style> <Grid> <TextBlock Margin="8,2" HorizontalAlignment="Stretch" TextWrapping="Wrap" Text="{Binding Subject}" Grid.Column="1" /> <TextBlock Margin="8,2" HorizontalAlignment="Stretch" TextWrapping="Wrap" Text="{Binding ProductCategory}" Grid.Column="1" /> </Grid> </Border> </Grid> </DataTemplate>