Telerik Forums
UI for WPF Forum
3 answers
804 views
Hi,

I'm using this code to show a modal RadWindow:

private void SendCommandExecuted(object parameter)
{
    PopupDeviceView popupDeviceView = new PopupDeviceView();
    PopupDeviceViewModel popupDeviceViewModel = (PopupDeviceViewModel)popupDeviceView.DataContext;
 
    RadWindow radWindow = new RadWindow();
    radWindow.Content = popupDeviceView;
    radWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
    radWindow.ResizeMode = ResizeMode.NoResize;
    radWindow.CanClose = false;
    radWindow.CanMove = false;
 
    radWindow.ShowDialog();
}

it opens a RadWindow as modal, in the main window, but when I minimize that main window - my modal RadWindow dissapears, its only available with Alt+Tab windows keys - and only the main window is shown. And the worst - main window's button, that opened my RadWindow - can be hit with Enter key (not with mouse tho).

What should I do to make it trully 'modal'? TIA
George
Telerik team
 answered on 20 Oct 2014
3 answers
156 views
Greetings, Telerik!

In out project we use diagram with all available types of layout.
Almost all layout types works great but radial tree behaves weird and it's unclear how the one can fix it without your help.
Mostly, we have a lot of containers in diagram and when radial tree is applied it looks fine, but when container that was placed above is expanded it is placed above and connected container isn't visible. Attached file can explain it better than thousand words.

In project we agreed to use next TreeLayoutSettings (regarding Radial tree)
StartRadialAngle = 1.0,
EndRadialAngle = 6.5,
RadialFirstLEvelSeparation = 150.0,
RadialSeparation = 150,
KeepComponentsInOneRadialLayout = true,
I believe that OrgTreeRouter means nothing when layout is being done.
Also we're filling collection of Roots for settings according to some rules (mostly the root will be the shape/container with outgoing connections).

Is it possible for radial tree to respect margins and place containers with some margins?

Thanks in advance! 
Martin Ivanov
Telerik team
 answered on 20 Oct 2014
6 answers
192 views
AutoCompleteBox loses its highlighting when the itemsource collection changes. To reproduce this issue type in the AutoCompleteBox and while it’s active and the popup is open, trigger a collection change event. The highlighting will automatically disappear, now if the collection changes again the highlighting reappears. This keeps toggling back and forth.

Attached is the screenshot.
Below are the code snippets.

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using Telerik.Windows.Controls;
 
namespace HighlightMatchingItemsText
{
    public class Country
    {
        public string Name { get; set; }
        public string Capital { get; set; }
    }
 
    public class ViewModel : ViewModelBase
    {
        private ObservableCollection<Country> countries;
 
        public ViewModel()
        {
            this.Countries = new ObservableCollection<Country>()
            {
                new Country() { Name = "Australia", Capital = "Canberra" },
                new Country() { Name = "Bulgaria", Capital = "Sofia" },
                new Country() { Name = "Canada", Capital = "Ottawa" },
                new Country() { Name = "Denmark", Capital = "Copenhagen" },
                new Country() { Name = "France", Capital = "Paris" },
                new Country() { Name = "Germany", Capital = "Berlin" },
                new Country() { Name = "India", Capital = "New Delhi" },
                new Country() { Name = "Italy", Capital = "Rome" },
                new Country() { Name = "Norway", Capital = "Oslo" },
                new Country() { Name = "Russia", Capital = "Moscow" },
                new Country() { Name = "Spain", Capital = "Madrid" },
                new Country() { Name = "United Kingdom", Capital = "London" },
                new Country() { Name = "United States", Capital = "Washington, D.C." },
            };
 
            var o = System.Reactive.Linq.Observable.Start(() =>
            {
                //starts on a background thread.
                while (true)
                {
                    Thread.Sleep(6000);
                    this.Countries = new ObservableCollection<Country>()
                    {
                        new Country() { Name = "Australia", Capital = "Canberra" },
                        new Country() { Name = "Bulgaria", Capital = "Sofia" },
                        new Country() { Name = "Canada", Capital = "Ottawa" },
                        new Country() { Name = "Denmark", Capital = "Copenhagen" },
                    };
                    Console.WriteLine("Collection Changed");
                }
            });
 
        }
 
         public ObservableCollection<Country> Countries
        {
            get { return this.countries; }
            set
            {
                if (this.countries != value)
                {
                    this.countries = value;
                    this.OnPropertyChanged(() => this.Countries);
                }
            }
        }
    }
}

<UserControl x:Class="HighlightMatchingItemsText.Example"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:local="clr-namespace:HighlightMatchingItemsText"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300" Width="300">
    <UserControl.DataContext>
        <local:ViewModel />
    </UserControl.DataContext>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TextBlock Text="Type A in the autocomplete box, Australia gets highlighted. Keep the drop down open and wait for 6 seconds, the collection changes and the highlighting dissappears.
                   Wait for another 6 seconds, the collection changes and the highlighting reappaers. This keeps toggling. "
                   TextWrapping="Wrap"
                   FontWeight="Bold"
                   Margin="20"/>
        <telerik:RadAutoCompleteBox x:Name="AutoComplete"
                                    Grid.Row="1"
                                    Margin="20"
                                    ItemsSource="{Binding Countries}"
                                    TextSearchPath="Name"
                                    TextSearchMode="Contains"
                                    AutoCompleteMode="Suggest"
                                    >
        </telerik:RadAutoCompleteBox>       
    </Grid>
</UserControl>







Vladi
Telerik team
 answered on 20 Oct 2014
1 answer
152 views
How can disable animation components - RadScheduleView?

This does not work:
Telerik.Windows.Controls.Animation.AnimationManager.IsGlobalAnimationEnabled = false;
Telerik.Windows.Controls.Animation.AnimationManager.SetIsAnimationEnabled(UIscheduler, false);

Thank you.
Yana
Telerik team
 answered on 20 Oct 2014
1 answer
144 views
I am having some issues with finding what to call to set certain colors.  If you look at the attached RadGridView you will see these problems:

1. The child template has that light grey background.
2. On the selected tab it is white.
3. The selected grid header column is an orageish color (also is an orangeish color when moused over).

What are the proper ways to fix these color issues?  I've tried changing the style on almost everything and have had no success.
Vanya Pavlova
Telerik team
 answered on 20 Oct 2014
1 answer
140 views
Hi Team,
    I am setting current User Name in both of these places 

1) At Constructor of my User Control (after calling "Initialize Component")

    myRichTextEditor.CurrentUser = "My Current Logged in User";

2) "myRichTextEditor_CommentShowing" event.

private void myRichTextEditor_CommentShowing(object sender, CommentShowingEventArgs e)
        {
            e.AppearanceSettings.BorderBrush = new SolidColorBrush(Colors.Green);
            e.Comment.Author = "My Current Logged in User";
        }
However the "Author" Name is not displayed in "Comment".
Could you please help me to solve this.
Thanks.
Obuliraj Ramalingam



Todor
Telerik team
 answered on 20 Oct 2014
2 answers
118 views
Is there a way to configure the animation duration used by AutoFit() and Layout()?
Vinod
Top achievements
Rank 1
 answered on 18 Oct 2014
6 answers
777 views
I am setting the width of all the columns in the grid to Auto: column.Width = GridViewLength.Auto;
But the last column does not cover the entire area (attached image).


I also have changed the style of telerik:GridViewHeaderCell, and because the last column do not stretch i can see another cell with a different back ground color.
How can i change the color of that column header

Thanks
Vikas

Vikas
Top achievements
Rank 1
 answered on 17 Oct 2014
1 answer
648 views
I'm trying to use the RadListBox control because of it's drag and drop features, but am running into a problem that only shows up when smooth scrolling is enabled.  I've enabled smooth scrolling using the method posted elsewhere on the forums by setting the CanContentScroll property to False.

However, when this is enabled, and I click on an item in the list, the whole list scrolls up so that the clicked item is at the bottom of the viewable area.  The resulting effect is that over several clicks, I've scrolled to the top of the list.  This behavior doesn't happen when the ListBox scrolls by item (when CanContentScroll is not set to false).

I do not need the selection functionality of the ListBox, and I'm using it just for the built-in drag and drop features.  If there's another way to do the drag and drop without a Listbox, that's fine.

I need the ListBox to not scroll when an item is clicked, or another solution to the problem.  Without a resolution, I cannot use smooth scrolling, as this will be a deal-breaker for any user.

Here's a link to a project that will show the behavior: https://dl.dropboxusercontent.com/u/3583840/ProgrammingSolutions/TelerikDragAndDropTest2.zip

The project is for the Q1 2014 release, but I've tried the most recent one and I get the same results.
Kalin
Telerik team
 answered on 17 Oct 2014
7 answers
322 views
Can someone please comment on the satus of this bug.
I see a silverlight issue regarding this still open in PITS but do not know if this is already being tracked for WPF.
 
When using RadRibbonWindow maximized with Windows Taskbar set to Auto hide, when I move the mouse to the bottom of the screen, the task bar does not popup.
If I use a standards WPF window it does.

 
This works OK
<Window x:Class="MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" >
Blah...   
  </Window>
but not this

<telerik:RadRibbonWindow x:Class="MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
                         
                         
Blah...       
  
</telerik:RadRibbonWindow>
Martin Ivanov
Telerik team
 answered on 17 Oct 2014
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?