Telerik Forums
UI for WPF Forum
2 answers
257 views

Hello, we want to convert all windows in our multiwindow- application from System.Windows.Window to RadRibbonWindow or RadWindows, to offer the user a uniform impression. Unfortunately the RadWindow  behaves  differently than the System.Windows.Window when it comes to minimizing and the taskbar. 

Using the RadRibbonWindow for all windows seems to be a working solution, but is it a good idea? Or is it only intended for use with a RadRibbonBar?

Maybe there is another way to use Telerik themes with System.Windows.Window's?

 

greetings

sebastian

Vladimir Stoyanov
Telerik team
 answered on 01 Feb 2021
1 answer
133 views
Hello,
let me begin by saying I'm a beginner,
I've tried searching on google but haven't found the answer to my questions, maybe I'm using the wrong terms.

I want to make a program for my job. I've settled on a basic design but need a bit of help getting there.

I want a MainWindow with a dashboard on the Left. with a section on the right that changes based on which dashboard item is selected.
Tell me if I'm wrong, but I think I would need to create separate windows for each and every dashboard items (I have 6). Once the selected Item Changes, the program would close the previous window and open the one corresponding to the newly selected dashboard item.

Also, for one of those window, I would need the user to have the possibility of adding fields. The reason is I need to create a logic tree of the historic of a land parcel. For Example, Lot 1 000 000 replaces lot 12345-1 on one line and lot 12345-1 is a subdivision of lot 12345. Each line would be added by the user and would include 2 labels, 2 text fields and a date field.

I'm sorry if my questions are basic and my sentencing not perfect (English is my second language).
Any help will be greatly appreciated,
Simon
Dinko | Tech Support Engineer
Telerik team
 answered on 01 Feb 2021
2 answers
110 views
How can I proggramatically scroll the SyntaxEditor content?
Gonzalo
Top achievements
Rank 1
 answered on 29 Jan 2021
1 answer
137 views

I have create a project where the user creates different filter buttons which, when clicked, updates the SearchText in the SearchPanel.  And then the user can persist these saved buttons and reload at startup.  Everything is working great except one thing!    If the user sets SearchText and the grid then gets new data, the SearchText goes blank.  Is there a way to persist the SearchText regardless of the underlining data changing?

I am actually using an external Textbox to set the SearchText and followed some of your examples of binding to the SeachText.

 

private void OnLoaded(object sender, RoutedEventArgs e)
        {
            this.GridStats.ShowSearchPanel = false;
            _vmSearchPanel = this.GridStats.ChildrenOfType<GridViewSearchPanel>().FirstOrDefault();
            this.txtFilter.SetBinding(TextBox.TextProperty, new Binding("SearchText") { Source = _vmSearchPanel.DataContext, Mode = BindingMode.TwoWay });
        }

 

On a side note, it would be nice to be able to easily save/load SearchText because it makes a quicker way version saving all the Filter criteria on the Grid or using a RadFilter if you just want one textbox.

 

Martin Ivanov
Telerik team
 answered on 29 Jan 2021
4 answers
661 views

After reading the documentation on the RadTransitionControl, I'm no closer to understanding how it works.  You have some sample code but it is out of context and/or partial.  I'm trying to perform a simple task of fading in/out two images.

Any hints?  I don't need to load and entire project or solution ... just a relevant code snippet would do.

Cheers, Rob.

Vladimir Stoyanov
Telerik team
 answered on 29 Jan 2021
5 answers
181 views

Hello Telerik Team,

 I'm trying to change the orientation of my tiles within a group from vertical default orientation to horizontal orientation.

 I already created a class derived from TileListPanel overriding the default orientation:

public class CustomTileListPanel : TileListPanel
{
    protected override bool HasLogicalOrientation { get { return true; } }
    protected override Orientation LogicalOrientation { get { return Orientation.Horizontal; } }
}

 

But unfortunately this has no effect.

 Please tell me how I can change the orientation of the tiles.

 

Regards,

Johannes

Martin Ivanov
Telerik team
 answered on 29 Jan 2021
5 answers
263 views

Hello.

 

I'm trying to use a shortcut key for an item in the navigation child.

It was successful until the view was opened by generating a command by receiving a gesture by key binding.

However, it is not a choice for navigation items.

I set the navigation index, but it didn't work.

Is there a way to open the upper layer and select the lower layer?

 

Thanks.

Martin Ivanov
Telerik team
 answered on 29 Jan 2021
11 answers
652 views
Is there a way to hide the RibbonTab strip when contained within a RibbonView?

When previously using the RibbonBar, setting HeaderVisibility="Collapsed" in the RibbonTab would hide the tab strip entirely.  In the RibbonView, this functionality appears to be absent.  Is there a workaround to get the same effect?
Martin Ivanov
Telerik team
 answered on 28 Jan 2021
3 answers
68 views

Hello,

The application I am working on is throwing the following unhandled exception whenever I attempt to identify a TabControl WPF object using my automation tool. This issue started occurring when we upgraded our Telerik libraries from Library v2012.3.1129.40 to v2012.1.326.402. We are using HP QTP to automate our testing.

When I try to access the TabControl I get the following unhandled exception:

System.Reflection.TargetInvocationException was unhandled
  Message=Exception has been thrown by the target of an invocation.
  Source=mscorlib
  StackTrace:
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       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.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       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.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       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.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at PM.Live.Client.App.Main() in C:\pl\Source\PM\PM.Live.Client\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       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()
  InnerException: System.MissingMethodException
       Message=Method 'PM.Live.Client.Common.Controls.TertiaryTabControl.Item' not found.
       Source=mscorlib
       StackTrace:
            at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
            at Mercury.WpfAgent.DispWrapper.DispThreadInvoke(String name, BindingFlags invokeAttr, Binder binder, Object obj, Object[] UnWrappedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters)
       InnerException:

I have had a similar issue with an Telerik.Windows.Automation.Peers.GridViewGroupPanelAutomationPeer.GetChildrenCore()  which was resolved in internal build version 2012.3.1314. Is this too related to the Automation class change from the last quarterly build? Will there be a fix provided for this issue as well?

 

Regards,

Mike

Dinko | Tech Support Engineer
Telerik team
 answered on 27 Jan 2021
2 answers
233 views

Hi,

I've created a ChartView with a label bindind based on the code that I've found here https://www.telerik.com/forums/categoricalaxis-set-the-label-from-a-datapoint-dataitem.

 

My problem is that I'm not able to have the label updated when I change the set of data. The graphic is correctly updated but not the label.
I suspect an issue around the Attached Propery but I'm not able to find where is my issue. Is a way to force the update of the AxisLabel ?

Here is the code that I've changed in the code found in the previous link.

Thanks for your help.

<Window x:Class="Label_Binding.MainWindow"
        xmlns:local="clr-namespace:Label_Binding"
        mc:Ignorable="d"
        Title="MainWindow" >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="20"/>
        </Grid.RowDefinitions>
        <telerik:RadCartesianChart Grid.Row="0">
             
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:CategoricalAxis >
                    <telerik:CategoricalAxis.LabelTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Vertical">
                                <telerik:Label local:ChartUtilities.AxisLabelContent="{Binding}"  />
                            </StackPanel>
                        </DataTemplate>
                    </telerik:CategoricalAxis.LabelTemplate>
                </telerik:CategoricalAxis>
            </telerik:RadCartesianChart.HorizontalAxis>
             
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis Minimum="0" Maximum="100" MajorStep="20" />
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:RadCartesianChart.Series>
                <telerik:BarSeries CategoryBinding="Category" ValueBinding="Level" ItemsSource="{Binding FilteredData}" CombineMode="Stack">
                    <telerik:BarSeries.PointTemplate>
                        <DataTemplate>
                            <Rectangle Fill="{Binding DataItem.FillColor}"/>
                        </DataTemplate>
                    </telerik:BarSeries.PointTemplate>
                </telerik:BarSeries>
                <!--<telerik:StepLineSeries CategoryBinding="Category" ValueBinding="MaxLevel" ItemsSource="{Binding OctaveData}" ShowLabels="True" Stroke="DarkGray" />-->
            </telerik:RadCartesianChart.Series>
        </telerik:RadCartesianChart>
        <telerik:RadButton Grid.Row="1" Content="Change Source" Click="RadButton_Click"/>
    </Grid>
</Window>

 

using System.Windows;
 
namespace Label_Binding
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        ViewModel vm;
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = vm = new ViewModel();
        }
 
        private void RadButton_Click(object sender, RoutedEventArgs e)
        {
            vm.ChangeData();
        }
    }
}

 

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Windows.Media;
 
namespace Label_Binding
{
    public class ViewModel : INotifyPropertyChanged
    {
        public ObservableCollection<ChartData> Data { get; set; }
        public IEnumerable<ChartData> FilteredData { get; set; }
 
        Random rnd = new Random();
        private Boolean isChanged;
 
        public event PropertyChangedEventHandler PropertyChanged;
        private void RaisePropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
 
        public ViewModel()
        {
            Data = new ObservableCollection<ChartData>();
            GetData();
            isChanged = false;
            FilteredData = Data.Where(n => n.Index < 5);
        }
 
        public void ChangeData()
        {
            if (!isChanged)
            {
                FilteredData = Data.Where(n => n.Index >= 5);
            }
            else
            {
                FilteredData = Data.Where(n => n.Index < 5);
            }
            isChanged = !isChanged;           
            RaisePropertyChanged("FilteredData");
        }
 
        private void GetData()
        {
            for (int i = 0; i < 5; i++)
            {
                ChartData point = new ChartData();
                point.Index = i;
                point.Category = "Cat "+i;
                point.Average = rnd.Next(10,60);
                point.Level = rnd.Next(10,60);
                point.FillColor = new SolidColorBrush(Colors.Bisque);         
                Data.Add(point);
            }
            for (int i = 0; i < 5; i++)
            {
                ChartData point = new ChartData();
                point.Index = i + 5;
                point.Category = "Cat " + i;
                point.Average = rnd.Next(10, 60);
                point.Level = rnd.Next(10, 60);
                point.FillColor = new SolidColorBrush(Colors.Bisque);
                Data.Add(point);
            }
        }
    }
}

 

 

Guillaume
Top achievements
Rank 1
 answered on 27 Jan 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?