Hello Telerik Team,
I am facing some issue when trying to load a page with a PDF, just like we find on your updated SDK Samples Browser (PdfViewer -> Change Scale Factor)
basically I just added the required assemblies we see here http://docs.telerik.com/devtools/wpf/controls/radpdfviewer/getting-started , and copied and pasted the code from that sample
The sample runs fine. Even with my PDF on it.
But I am having the error you can see in the attached picture when I place it on my solution.
Is there anything I am missing?
Thank you
Dim sm As New SeriesMapping
sm.SeriesDefinition = New LineSeriesDefinition
sm.ItemMappings.Add(New ItemMapping("VDate", DataPointMember.XCategory))
sm.ItemMappings.Add(New ItemMapping("Sales", DataPointMember.YValue, ChartAggregateFunction.Sum))
rd.SeriesMappings.Add(sm)
rd.ItemsSource = DataSetMain.Tables(3)
Hi,
I need to create a set of RadMaskedNumericInput dynamically in code. I have the following (working) code with WPF TextBox
var textBox = new TextBox
{
Height = 23,
Width = 40,
Margin = new Thickness(recalculatedPoint.X, recalculatedPoint.Y, 0, 0),
VerticalAlignment = VerticalAlignment.Top,
HorizontalAlignment = HorizontalAlignment.Left
};
Binding bind = new Binding(bindingExpression)
{
Source = this,
Mode = BindingMode.TwoWay,
UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged
};
textBox.SetBinding(TextBox.TextProperty, bind);
When I change the control type from TextBox to RadMaskedNumericInput and binding property from TextBox.TextProperty to RadMaskedNumericInput.ValueProperty control is created but binding does not work.The code is:
var textBox = new RadMaskedNumericInput
{
Height = 23,
Width = 40,
Margin = new Thickness(recalculatedPoint.X, recalculatedPoint.Y, 0, 0),
VerticalAlignment = VerticalAlignment.Top,
HorizontalAlignment = HorizontalAlignment.Left
};
Binding bind = new Binding(bindingExpression)
{
Source = this,
Mode = BindingMode.TwoWay,
UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged
};
textBox.SetBinding(RadMaskedNumericInput.ValueProperty, bind);
Has anyone an idea why binding does not work?
Thanks in advance.
Have a nice day
Is there a way to make the validation error message for input controls in general (WatermarkedTextBox, NumericUpDown, MaskedInputs etc) appear on focus of the field? By default it appears on hovering over the small triangle in the upper-right corner of the control, when it's in the error state. This however is pretty hard for users to figure out and also sometimes to correctly "hit" with the mouse cursor.
Thanks!
I'm trying to get the label to align left, and the text box to align left, in their respective columns. Can't make it happen. Both the label and the textbox seem to move to the same column, and have a mind of their own.
Here's the set-up:
<Grid ShowGridLines="True" x:Name="DetailsTemplateEdit_Section_Main_Controls" HorizontalAlignment="Stretch" Background="White" MaxWidth="{Binding ActualWidth, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Border}}}">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition MinWidth="150" MaxWidth="150"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<telerik:DataFormDataField Grid.Row="0" Grid.Column="0"
Label="{x:Static properties:Resources.Compliance_Label_Name}"
DataMemberBinding="{Binding Name, Mode=TwoWay}" Template="{DynamicResource CustomDataFormDataFieldControlTemplate}">
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=True, ValidatesOnExceptions=True}"
IsEnabled="{Binding CanBeDeleted}" x:Name="txt_name" HorizontalAlignment="Left"
Style="{StaticResource WaterMarkTextBox}" THOR:WaterMarkTextHelper.WatermarkText="{x:Static properties:Resources.Compliance_Label_Name}"
MaxLength="50" ToolTip="{x:Static properties:Resources.ComplianceSetup_tooltip_name}" />
</telerik:DataFormDataField>
So, based on an example I saw the grid should have three columns, and I tried to set the label to be in column 1, and the text box in column 2, and I need both to align to the left within their columns.
Hints ?
Hi Everyone,
I have a unique required. I want show error when two rows
are same. In attached image table all rows are valid rows except last and first rows. I
want show error at first and last row. Can please help me here.
Note: There is no unique Column values.
Regards,
Rajendar.
Hi,
I'm binding a custom ObservableCollection to the AppointmentsSource of radScheduleView. This doesn't specialize ObservableCollection but still implements INotifyPropertyChanged, INotifyCollectionChanged and ICollection.
The fact is : DisplayedElements are not refreshed when I add an element (either with UI or code) and I need to refresh the ScheduleView (for example : changing ViewDefinition) for them to appear. A bigger problem is in inlining editing since CreateInlineAppointment does Remove immediately after CreateNew (because the new element isn't in the displayed element).
Then I wonder what is the "ObservableCollection" expected behaviour for the DisplayedElements to be refreshed ?
Same question may apply to "Appointment" (ours is implementing IAppointment, INotifyPropertyChanged).
Thanks for your help.
I am trying to set the Foreground color of selected RadTreeViewItem but it cannot be set, though, other elements like Background is working.
<
UserControl
>
<
UserControl.Resources
>
<
DataTemplate
x:Key
=
"AdvancedVariableTemplate"
>
<
RadioButton
Checked
=
"itemCont
<
ResourceDictionary
>
<!-- ItemContainerStyleSelector -->
<
Style
x:Key
=
"AdvancedVariableItemContainerStyle"
TargetType
=
"telerik:RadTreeViewItem"
BasedOn
=
"{StaticResource RadTreeViewItemStyle}"
>
<
Setter
Property
=
"Background"
Value
=
"Red"
/>
<
Setter
Property
=
"Foreground"
Value
=
"Green"
/>
</
Style
>
</
ResourceDictionary
>
class
AdvVariableContainerStyleSelector : StyleSelector
{
private
Style darkThemeStyle;
private
Style lightThemeStyle;
public
override
Style SelectStyle(
object
item, DependencyObject container)
{
Configuration config = UserConfigurations.getConfig();
if
(config.AppSettings.Settings[
"CurrentTheme"
] !=
null
)
{
switch
(config.AppSettings.Settings[
"CurrentTheme"
].Value.ToString().ToUpper())
{
case
"LIGHT"
:
return
lightThemeStyle;
case
"STANDARD"
:
return
lightThemeStyle;
case
"DARK"
:
return
darkThemeStyle;
default
:
return
null
;
}
}
else
return
null
;
}
public
Style DarkThemeStyle
{
get
{
return
this
.darkThemeStyle;
}
set
{
this
.darkThemeStyle = value;
}
}
public
Style LightThemeStyle
{
get
{
return
this
.lightThemeStyle;
}
set
{
this
.lightThemeStyle = value;
}
}
}
ainerRadio_Checked"
Content
=
"{Binding CustomName}"
ToolTip
=
"{Binding TooltipString}"
/>
</
DataTemplate
>
<
HierarchicalDataTemplate
x:Key
=
"AdvancedGroupSeriesRadioTemplate"
ItemsSource
=
"{Binding LstAppDataSeries}"
>
<
TextBlock
Text
=
"{Binding CustomName}"
FontWeight
=
"Bold"
/>
</
HierarchicalDataTemplate
>
<
HierarchicalDataTemplate
x:Key
=
"AdvancedGroupSideTemplate"
ItemsSource
=
"{Binding LstAppDataSeriesSides}"
>
<
TextBlock
Text
=
"{Binding CustomName}"
FontWeight
=
"Bold"
/>
</
HierarchicalDataTemplate
>
<
VariablesGroup:VariablesHierarchicalTemplate
x:Key
=
"AdvancedVariableItemTemplate"
VariablesGroupsTemplate
=
"{StaticResource AdvancedGroupSideTemplate}"
VariableSideTemplate
=
"{StaticResource AdvancedGroupSeriesRadioTemplate}"
VariableTemplate
=
"{StaticResource AdvancedVariableTemplate}"
/>
<
VariablesGroup:AdvVariableContainerStyleSelector
x:Key
=
"AdvancedVariableStyleSelector"
DarkThemeStyle
=
"{StaticResource AdvancedVariableItemContainerStyle}"
LightThemeStyle
=
"{StaticResource AdvancedVariableItemContainerStyle}"
/>
</
UserControl.Resources
>
<
Grid
>
<
telerik:RadTreeView
x:Name
=
"lstVariablesAdvanced"
SelectedItem
=
"{DynamicResource AdvancedVariableItemContainerStyle}"
VerticalAlignment
=
"Stretch"
Grid.Row
=
"1"
Grid.ColumnSpan
=
"2"
BorderThickness
=
"0,0,0,0"
ScrollViewer.CanContentScroll
=
"False"
IsEditable
=
"True"
SelectionMode
=
"Extended"
ItemsSource
=
"{Binding LstAppDataSeriesGrouping}"
IsDropPreviewLineEnabled
=
"False"
IsDragPreviewEnabled
=
"True"
IsDragTooltipEnabled
=
"False"
MouseDown
=
"lstVariablesAdvanced_MouseDown"
IsSingleExpandPath
=
"True"
IsExpandOnSingleClickEnabled
=
"False"
IsDragDropEnabled
=
"False"
PreviewKeyDown
=
"lstVariables_PreviewKeyDown"
IsLineEnabled
=
"True"
ItemTemplateSelector
=
"{StaticResource AdvancedVariableItemTemplate}"
ItemContainerStyleSelector
=
"{StaticResource AdvancedVariableStyleSelector}"
Margin
=
"10,0,6,0"
>
</
telerik:RadTreeView
>
</
Grid
>
</
UserControl
>