Telerik Forums
UI for WPF Forum
1 answer
146 views
HI,

I use this XMAL :
<telerik:TimelineViewDefinition
  GroupTickLength="1m"
  StretchAppointments="False"
  StretchGroupHeaders="True"
  MinTimeRulerExtent="1"/>

but the appointments will be stretched... (see attachment)
I use my own AppointmentItemContentTemplate with a TextBlock and a ProgressBar and set the MinAppointmentHeight="40"

How yould I fix this issue?

Thx
Kalin
Telerik team
 answered on 14 Dec 2013
1 answer
104 views

Hi,


For my purposes, I am using RadRichTextBox instead of RadTextBox in order to take advantage of the spell check, where incorrect words get underlined.



I need to create something similar to an EmptyContent property in RadMaskedTextInput control.  Can someone suggest how to such behavior to the RadRichTextBox?



Thank you in advance,



Michael

Petya
Telerik team
 answered on 13 Dec 2013
3 answers
257 views
Hello,

It seems to have a bug with async binding and GridView.

Indeed when i create a grid view with synchronous binding like that :

<telerik:RadGridView Margin="5,5,5,5" IsReadOnly="True" AutoGenerateColumns="False" ColumnsWidthMode="Fill" ShowColumnHeaders="True" ShowGroupPanel="True" ItemsSource="{Binding Path=AssetAnalysers}"
                        <telerik:RadGridView.Columns> 
                            <telerik:GridViewDataColumn x:Name="AlertTypeColumn"  HeaderText="Type" UniqueName="Analyser.Name" Width="100"/> 
                            <telerik:GridViewDataColumn x:Name="AlertNameColumn"  HeaderText="Name" UniqueName="AnalysedObjectId"/> 
                            <telerik:GridViewDataColumn x:Name="AlertLevelColumn" HeaderText="Level" UniqueName="Level" Width="100"/> 
                            <telerik:GridViewDataColumn x:Name="AlertMessageColumn" HeaderText="Message" UniqueName="Message"/> 
                        </telerik:RadGridView.Columns> 
                    </telerik:RadGridView> 

Everything works well.

But when i try to make Asynchronous Binding (because the property AssetAnalysers take time to load) like that :

                    <telerik:RadGridView Margin="5,5,5,5" IsReadOnly="True" AutoGenerateColumns="False" ColumnsWidthMode="Fill" ShowColumnHeaders="True" ShowGroupPanel="True" ItemsSource="{Binding Path=AssetAnalysers, IsAsync=true}"
                        <telerik:RadGridView.Columns> 
                            <telerik:GridViewDataColumn x:Name="AlertTypeColumn"  HeaderText="Type" UniqueName="Analyser.Name" Width="100"/> 
                            <telerik:GridViewDataColumn x:Name="AlertNameColumn"  HeaderText="Name" UniqueName="AnalysedObjectId"/> 
                            <telerik:GridViewDataColumn x:Name="AlertLevelColumn" HeaderText="Level" UniqueName="Level" Width="100"/> 
                            <telerik:GridViewDataColumn x:Name="AlertMessageColumn" HeaderText="Message" UniqueName="Message"/> 
                        </telerik:RadGridView.Columns> 
                    </telerik:RadGridView> 

At the first loading the four columns are well generated but when my property AssetAnalysers change (it's a INotifyChangedProperty), the binding seems correct but my columns are not generated. So, the GridView looks like empty (but i have rows).

Where is the problem ?

By the way what's the difference and the correct using of UniqueName, DataMemberBinding and DataMemberPath Properties when you have already a binding on ItemSource.

Thank you in advance for your answer.

G. Moelens





Ido
Top achievements
Rank 1
 answered on 13 Dec 2013
3 answers
241 views

I have a WPF application that uses the Rad Controls for WPF.  On one of the windows, there is a RadDateTimePicker:


   

<telerik:RadDateTimePicker FontSize="{x:Static res:Car.Common_DataEntryFontSize}"
                                           FontWeight="Bold"
                                           Grid.Column="1"
                                           Grid.Row="2"
                                           Height="35"
                                           Margin="5,5,30,5"
                                           Name="BeginDatePicker"
                                           SelectedValue="{Binding Converter={StaticResource DateConverterForPicker}, Mode=TwoWay, Path=LocalBeginDate, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
                                           SelectionChanged="BeginDatePicker_SelectionChanged"
                                           TabIndex="4"
                                           Validation.ErrorTemplate="{StaticResource InputErrorTemplate}"
                                           VerticalAlignment="Center"
                                           Visibility="{Binding Path=CanModify, Converter={StaticResource BoolToVisibility}}" />


Everything works fine when the machine's culture is set to en-US.  However, when I change my machine's culture to es-CL (Chile), the text "Enter Date" that appears in the control when it is empty does not get translated to Spanish.  I still see "Enter Date".



When a date is displayed in the control, it's in the proper format for that region.  How do I get the "Enter Date" to display in Spanish?

Kalin
Telerik team
 answered on 13 Dec 2013
1 answer
263 views
I have created my image property in my view model and can see the correct format provider is being used and populating my RadBitmap property but the binding does not work on the RadImageEditorUI control.

 

string extension = Path.GetExtension(FilePath).ToLower();
            Stream stream = File.OpenRead(FilePath);
            IImageFormatProvider formatProvider = ImageFormatProviderManager.GetFormatProviderByExtension(extension);
            if (formatProvider != null)
            {
                ImagePath = formatProvider.Import(stream);
            }
            stream.Close();
 
XAML:
<telerik:RadImageEditorUI x:Name="ImageEditorUi" Image="{Binding ImagePath}" Style="{DynamicResource ImageEditorStyle1}">

Is binding working for this control? If so, please provide a MVVM example because the documentaiton for this has no binding examples.

Petya
Telerik team
 answered on 13 Dec 2013
6 answers
222 views
Hello,

Basically I am positioning the cursor in the box mid way though a number and then just holding down backspace and I get an IndexOutOfRangeException which says "Index was outside the bounds of the array.". I do have a screencast of me creating the error if you need that.

Here is the xaml:

<telerik:RadMaskedCurrencyInput Grid.Row="5" Grid.Column="3" Value="{ Binding BgsStepBase, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}" Style="{ StaticResource StandardRadMaskedCurrencyInput}" Validation.ErrorTemplate="{ StaticResource RadMaskedCurrencyInputErrorTemplate}" IsClearButtonVisible="True" IsReadOnly="{Binding IsBgsFieldEnabled, Converter={StaticResource NotConverter}}" FormatString="n0" />

The bound value is decimal? (nullable decimal).

The stack trace is:

   at Telerik.Windows.Controls.RadMaskedInputBase.FindPreviousAvailablePositionNoMask() in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\MaskedInput\RadMaskedInputBase.NoMask.cs:line 209
   at Telerik.Windows.Controls.RadMaskedCurrencyInput.HandleBackKeyNoMask() in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\MaskedInput\RadMaskedCurrencyInput.NoMask.cs:line 120
   at Telerik.Windows.Controls.RadMaskedInputBase.HandleBackKey() in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\MaskedInput\RadMaskedInputBase.cs:line 2154
   at Telerik.Windows.Controls.RadMaskedInputBase.OnKeyDown(Object sender, KeyEventArgs e) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\Input\MaskedInput\RadMaskedInputBase.cs:line 1701
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
   at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
   at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled)
   at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run()
   at GH.WPF.App.App.Main() in C:\DevWork\Cubit2\Dev\Features\CommonPartEnhancementV1\GH.WPF.Cubit2\obj\x86\Debug\App.g.cs:line 0
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()



Thanks,

Alex
Petar Mladenov
Telerik team
 answered on 13 Dec 2013
1 answer
178 views
I downloaded the most recent source code and called the "Build_WPF40_Xamlless.bat 12/11/2013" to build the Release.NoXaml .NET 4 .DLLs.  In my App.xaml, I'm merging dictionaries:  

<ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="/Telerik.Windows.Themes.Windows7;component/Themes/Telerik.Windows.Controls.xaml" />
    <ResourceDictionary Source="/Telerik.Windows.Themes.Windows7;component/Themes/System.Windows.xaml" />
    <ResourceDictionary Source="/Telerik.Windows.Themes.Windows7;component/Themes/Telerik.Windows.Controls.Input.xaml" />
    <ResourceDictionary Source="/Telerik.Windows.Themes.Windows7;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
    <ResourceDictionary Source="/Telerik.Windows.Themes.Windows7;component/Themes/Telerik.Windows.Controls.Chart.xaml" />
    <ResourceDictionary Source="/Telerik.Windows.Themes.Windows7;component/Themes/Telerik.Windows.Controls.Data.xaml" />
    <ResourceDictionary Source="/Telerik.Windows.Themes.Windows7;component/Themes/Telerik.Windows.Controls.GridView.xaml" />
    <ResourceDictionary Source="/Telerik.Windows.Themes.Windows7;component/Themes/Telerik.Windows.Controls.RibbonView.xaml" />
    <ResourceDictionary Source="Resource Dictionaries/MyDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>

and I'm getting a Object does not match target type in App.xaml during design time.  If I delete the line:

<ResourceDictionary Source="/Telerik.Windows.Themes.Windows7;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />

The error goes away.  Is there anything I can do to get ride of this error?


Yana
Telerik team
 answered on 13 Dec 2013
3 answers
118 views
Hi,

We are interested in using RadDataForms and currently we are referencing the no Xaml  Telerik Assemblies in our Product. when we the ItemSource is bound to an Observable collection no Data is displayed, but when we use the Full Fat Telerik assemblies all seems to work fine. we really prefer not to use the Bulky Telerik Assemblies because of their Massive Size. so Is there any way so that we don’t have to use the bulky Telerik Assemblies to make RadDataForm Work. 

following are the screen shots:

Kind Regards,


 
Vera
Telerik team
 answered on 13 Dec 2013
7 answers
274 views
Hi,

I have a RadGridView in a radpane, selectedItem return correctly, but after the radpane undocked, or docking again after undocked, the always selectedItem return null which I used for DragAndDrop. Anthing wrong or what should I do to get selectedItem return correct value? here is code:
<telerik:RadGridView
                    x:Name="itemView"
                    ItemsSource="{Binding AvailableItems}"
                    SelectedItem="{Binding SelectedAvailableItem}"
                    SelectionMode="Extended"
                    SelectionUnit="FullRow"
                    IsReadOnly="True"
                    CanUserSelect="True"
                    AllowDrop="True"
                    AutoGenerateColumns="False"
                    IsFilteringAllowed="False"
                    RowIndicatorVisibility="Collapsed"
                    Grid.Column="0"
                    Grid.Row="1">
                  
                  <telerik:RadGridView.RowStyle>
                      <Style TargetType="telerik:GridViewRow">
                       <Setter Property="telerik:RadDragAndDropManager.AllowDrag"  Value="True" />
                      <EventSetter Event="Control.RequestBringIntoView" Handler="RadGridView_RequestBringIntoView"/>
                    </Style>
                  </telerik:RadGridView.RowStyle>
               </teleric.RadGridView>

in C#
  RadDragAndDropManager.AddDragQueryHandler(itemView, OnGridViewDragQuery);

private void OnGridViewDragQuery(object sender, DragDropQueryEventArgs e)
    {
      try
      {
        if (sender is RadGridView)
        {
          RadGridView gridView = sender as RadGridView;
          IList selectedItems = gridView.SelectedItems.ToList();
          e.QueryResult = selectedItems.Count > 0;
          e.Options.Payload = selectedItems;
        }
        else
        {
          e.QueryResult = true;
        }
      }
      catch (Exception)
      {
      }
      finally
      {
        e.Handled = true;
      }
    }

After undocking or docking again(data may rebinded), when drag a item in gridview, above gridView.SelectedItems in OnGridViewDragQuery() return null.

Thanks
Felix


Dimitrina
Telerik team
 answered on 13 Dec 2013
2 answers
275 views

How to give positive and negative values ​​set different colors.

ChartView can do it?

<chart:RadCartesianChart x:Name="chart1" Width="1725" Height="176" TrackBallLineStyle="{StaticResource trackBallLineStyle}" Grid.RowSpan="2" Loaded="chart1_Loaded">
                        <chart:RadCartesianChart.TrackBallInfoStyle>
                            <Style TargetType="chartView:TrackBallInfoControl">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="chartView:TrackBallInfoControl">
                                            <StackPanel Name="panel">
                                            </StackPanel>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </chart:RadCartesianChart.TrackBallInfoStyle>
                        <chart:RadCartesianChart.Behaviors>
                            <chartView:ChartTrackBallBehavior ShowIntersectionPoints="False" />
                        </chart:RadCartesianChart.Behaviors>
                        <chartView:AreaSeries CategoryBinding="Time" ValueBinding="Data"  Fill="#FFCC80"  Stroke="#FF9900" StrokeThickness="2"  ItemsSource="{Binding DemoList}" Loaded="AreaSeries_Loaded">
                            <chartView:AreaSeries.TrackBallInfoTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Vertical" Margin="0,0,0,20">
                                        <Border Background="#666666" Width="65" Height="20" CornerRadius="3" HorizontalAlignment="Center" VerticalAlignment="Center">
                                            <TextBlock Text="{Binding DataPoint.Value}" FontSize="14" FontFamily="Segoe UI" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                        </Border>
                                        <Path HorizontalAlignment="Center" VerticalAlignment="Center" Height="6" Width="14" Stretch="Fill" Opacity="1" Data="M 25,22 C25,22 39,22 39,22 39,22 32,28 32,28 32,28 25,22 25,22 z" Fill="#666666" Margin="0,2,0,0"/>
                                    </StackPanel>
                                </DataTemplate>
                            </chartView:AreaSeries.TrackBallInfoTemplate>
                        </chartView:AreaSeries>
                        <chart:RadCartesianChart.HorizontalAxis>
                            <chartView:DateTimeContinuousAxis MajorStepUnit="Month"
                                                          MajorStep="3"
                                                LabelFormat="yyyyå¹´MM月ddæ—¥"
                                                LabelInterval="1" FontFamily="Segoe UI"
                                                PlotMode="OnTicks" />
                        </chart:RadCartesianChart.HorizontalAxis>
                        <chart:RadCartesianChart.VerticalAxis>
                            <chartView:LinearAxis Minimum="-3000"
                                    MajorStep="1000"
                                    Maximum="3000" FontFamily="Segoe UI" MajorTickStyle="{StaticResource tickStyle}" LabelStyle="{StaticResource yLableStyle}">
                            </chartView:LinearAxis>
                        </chart:RadCartesianChart.VerticalAxis>
                        <chart:RadCartesianChart.Grid>
                            <chartView:CartesianChartGrid MajorLinesVisibility="X" MajorXLineDashArray="7,3" StripLinesVisibility="Y">
                                <chartView:CartesianChartGrid.MajorXLineStyle>
                                    <Style TargetType="{x:Type Line}">
                                        <Setter Property="Stroke" Value="#CCCCCC"/>
                                    </Style>
                                </chartView:CartesianChartGrid.MajorXLineStyle>
                                <chartView:CartesianChartGrid.YStripeBrushes>
                                    <SolidColorBrush Color="Transparent" />
                                    <SolidColorBrush Color="#EDEDED" Opacity="0.5" />
                                </chartView:CartesianChartGrid.YStripeBrushes>
                            </chartView:CartesianChartGrid>
                        </chart:RadCartesianChart.Grid>
                    </chart:RadCartesianChart>

H
Top achievements
Rank 1
 answered on 13 Dec 2013
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?