Telerik Forums
UI for WPF Forum
4 answers
530 views

Dear Sirs,

I have been working with RadVirtualGrid for WPF and I have found a problem trying to change columns' visibility. I need to do it both from code and from xaml.
I would appreciate any help with it.

I'm working with DataProvider, if this info helps in anyway.

Thanks in advance,

Stefan
Telerik team
 answered on 16 Nov 2017
3 answers
94 views

I manually set the color of a Line Series in xaml as Blue. Now in tooltip I also want the same color.

<telerik:LineSeries x:Name=ser1 ItemsSource="{Binding Data}"
CategoryBinding="Name" Stroke="Blue" ValueBinding="Value">
   <telerik:LineSeries.TooltipTemplate>
        <DataTemplate>
             <SatckPanel>
                <ItemsControls ItemsSource="{Binding}">
                    <ItemsControl.Template>
                        <DataTemplate>
                           <Ellipse Width="12" Height="12" Fill="Blue">
                    ....
                        </DataTemplate>
                     </ItemsControl.Template>
                <ItemsControls>
            </StackPanel>
         </DataTemplate>
    </telerik:LineSeries.TooltipTemplate>
</telerik:LineSeries>

Now my question if we don't use hard code how can we make the colors same?

Trump
Top achievements
Rank 1
 answered on 16 Nov 2017
1 answer
252 views

I've got a TabStripPanel on a RadPaneGroup where sometimes the tabs are only the width of the label and other times they stretch to fill the entirety of the width of the pane. The application is using a pretty dated Telerik version 2014.3.2117.45

 

Any tips about why this sort of behavior could be manifesting? Thanks.

Martin
Telerik team
 answered on 16 Nov 2017
1 answer
185 views

I am using a ObservableGraphSourceBase with a fairly standard Link model and a  HierarchicalNodeViewModel as bases for my Diagram to display.

Within my Diagram declaration in the XAML I am successfully using ShapeStyleSelector property to set the style of my Nodes as they are dropped or read into the diagram.

I am looking for a way to remove and or add Connectors to the Nodes either from the Style via a Setter of some sort or somehow grammatically with a MVVM friendly method.

 

I have tried from within the HierarchicalNodeView model but it does not have access to the resulting shape it seems. Also the ObservableGraphSourceBase does not seem to have access to the resulting RadDiagramShape which houses the Connectors list.

 

Please help.

Petar Mladenov
Telerik team
 answered on 16 Nov 2017
2 answers
318 views

Hi,
I'm using 2017.3.913.45 and I've been trying to focus a NumericUpDown-Control when the user changes the current Tab of a RadTabControl.

So I've got a RadTabControl:

<telerik:RadTabControl ... SelectionChanged="TabControl_SelectionChanged" ...>
    ..
    <telerik:RadTabItem Name="MyTab">
        ..

        <telerik:RadNumericUpDown Name="MyNumericUpDown" ..></telerik:RadNumericUpDown>
         ..

    </telerik:RadTabItem>
    ..
</telerik:RadTabControl>

 

And a TabControl_SelectionChanged Method:

private void TabControl_SelectionChanged(object sender, RadSelectionChangedEventArgs e)
{
    try
    {
        if(e.AddedItems[0] == MyTab)
        {
            MyNumericUpDown.Focus();
            Keyboard.Focus(MyNumericUpDown);
        }
    }
    catch
    {
        System.Diagnostics.Debugger.Break();
    }
}

 

I initially only tried with MyNumericUpDown.Focus() which did not work, a colleague asked me to add the Keyboard.Focus(MyNumericUpDown) call, but that also does not work.

What's the workflow here?

ITC
Top achievements
Rank 1
 answered on 16 Nov 2017
1 answer
152 views

Hi,

How to disable renaming the Telerik Spreadsheet?

Here is the XAML and we are using Telerik 2017.2.614.45.NoXaml

<telerik:RadSpreadsheet
                        x:Name="sprSpecification"
                        Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}, Path=ActualWidth}"
                        Height="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}, Path=ActualHeight}"
                        ScrollViewer.HorizontalScrollBarVisibility="Auto"
                        ScrollViewer.VerticalScrollBarVisibility="Auto"
                        Workbook="{Binding Workbook, Mode=TwoWay}" />

 
Thanks,
Sri

Anna
Telerik team
 answered on 16 Nov 2017
1 answer
343 views

I use ChartView and BarSeries. I want different bar has different color. I defined six colors. So I defined the palette as below. However it is hard coded. Now I want to change the color by the value at the run time. Say less than 100 use color 1, 100~200 use color 2 etc. Not sure how?

<telerik:ChartPaletette x:key="myPalette">
      <telerik:ChartPalette.GlobalEntries>
            <telerik:PaletteEntry Fill="#FE24C532" />
            <telerik:PaletteEntry Fill="#FE54C5A1" />
            <telerik:PaletteEntry Fill="#FE2AC5D5" />
            <telerik:PaletteEntry Fill="#FE00CF4A" />
            <telerik:PaletteEntry Fill="#FE54A531" />
            <telerik:PaletteEntry Fill="#FE2CC5C1" />
       </telerik:ChartPalette.GlobalEntries>
</telerik:ChartPaletette x:key="myPalette">
Martin Ivanov
Telerik team
 answered on 16 Nov 2017
3 answers
175 views

I just got these Problem on Windows XP.

If any binded value get changed, the PropertyChanged event will throw an exception.

 

XAML-Code:

01.<telerik:RadWindow x:Class="TelerikWpfApp.TelerikScenario"
04.        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
05.        Header="TelerikScenario" Height="300" Width="300">
06.    <Grid>
07.        <Grid.ColumnDefinitions>
08.            <ColumnDefinition />
09.            <ColumnDefinition />
10.        </Grid.ColumnDefinitions>
11. 
12.        <Label Content="{Binding Text, UpdateSourceTrigger=PropertyChanged}" Grid.Column="0" />
13. 
14.        <Button Content="CHANGE VALUE" Click="Button_Click" Grid.Column="1" Height="150" Margin="5" />
15.    </Grid>
16.</telerik:RadWindow>

 

Code Behind:

using System;
using System.ComponentModel;
using System.Windows;
 
namespace TelerikWpfApp
{
    /// <summary>
    /// Interaction logic for TelerikScenario.xaml
    /// </summary>
    public partial class TelerikScenario : INotifyPropertyChanged
    {
        #region Private Fields
        private string text = "test";
        #endregion Private Fields
 
        #region Public Events
        public event PropertyChangedEventHandler PropertyChanged;
        #endregion Public Events
 
        #region Protected Methods
        protected void SetProperty<T>(ref T storage, T value, string property = null)
        {
            if (Object.Equals(storage, value)) return;
            storage = value;
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(property));
        }
        #endregion Protected Methods
 
        #region Public Properties
        public string Text
        {
            get { return text; }
            set { SetProperty(ref text, value); }
        }
        #endregion Public Properties
 
        #region Public Constructors
 
        public TelerikScenario()
        {
            InitializeComponent();
            DataContext = this;
        }
 
        #endregion Public Constructors
 
        #region Private Methods
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Text = "123";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        #endregion Private Methods
    }
}

 

Exception:

Cannot change AllowsTransparency after a Window has been shown or
WindowInteropHelper.EnsureHandle has been called.

 

  at System.Windows.Window.CoerceAllowsTransparency(DependencyObject d, Object value)
  at System.Windows.DependencyObject.ProcessCoerceValue(DependencyProperty dp,
  PropertyMetadata metadata, EntryIndex& entryIndex, Int32& targetIndex,
  EffectiveValueEntry& newEntry, EffectiveValueEntry& oldEntry, Object& oldValue,
  Object baseValue, Object controlValue, CoerceValueCallback coerceValueCallback,
  Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, Boolean
  skipBaseValueChecks)
  at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex,
  DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry,
  EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean
  coerceWithCurrentValue, OperationType operationType)
  at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
  at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean
  isASubPropertyChange)
  at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean
  isASubPropertyChange)
  at System.Windows.Data.BindingExpression.ScheduleTransfer(Boolean
  isASubPropertyChange)
  at MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean
  dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)
  at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k,
  ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
  at MS.Internal.Data.ClrBindingWorker.OnSourcePropertyChanged(Object o, String
  propName)
  at
  MS.Internal.Data.PropertyPathWorker.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type
  managerType, Object sender, EventArgs e)
  at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs
  args, ListenerList list)
  at System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object
  sender, PropertyChangedEventArgs args)
  at TelerikWpfApp.TelerikScenario.SetProperty[T](T& storage, T value, String
  property) in C:\Users\BL\Documents\Visual Studio
  2017\Projects\TelerikWpfApp\TelerikWpfApp\TelerikScenario.xaml.cs:line 39
  at TelerikWpfApp.TelerikScenario.set_Text(String value) in
  C:\Users\BL\Documents\Visual Studio
  2017\Projects\TelerikWpfApp\TelerikWpfApp\TelerikScenario.xaml.cs:line 47
  at TelerikWpfApp.TelerikScenario.Button_Click(Object sender, RoutedEventArgs e)
  in C:\Users\BL\Documents\Visual Studio
  2017\Projects\TelerikWpfApp\TelerikWpfApp\TelerikScenario.xaml.cs:line 66

Vladimir Stoyanov
Telerik team
 answered on 15 Nov 2017
1 answer
247 views

I'm trying to change the default rad button style

However, when looking for RadButtonStyle I find it's defined in:

Styles.xaml
Telerik.xaml
Telerik.Windows.Controls.Diagrams.Extensions.xaml
Telerik.Windows.Controls.FileDialogs.xaml
Telerik.Windows.Controls.Input.xaml
Telerik.Windows.Controls.Navigation.xaml
Telerik.Windows.Controls.RibbonView.xaml
Telerik.Windows.Controls.RichTextBoxUI.xaml
Telerik.Windows.Controls.xaml

 

Why is it so, and which one should I change?

Martin
Telerik team
 answered on 15 Nov 2017
1 answer
138 views
I need to know if WPF RadGridView works with BindingOperations.EnableCollectionSynchronization. If not what solution you are suggesting to iterate and update my collection from worker thread?
Dilyan Traykov
Telerik team
 answered on 15 Nov 2017
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?