Telerik Forums
UI for WPF Forum
6 answers
218 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
169 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
168 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
159 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
139 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
826 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
691 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
352 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
1 answer
172 views
Hi,

how to set theme for predefined dialog when window from which dialog called is within the dll that is called from WinForms?
Currently the window is not displayed.

<Window.Resources>
       <ResourceDictionary>
           <ResourceDictionary.MergedDictionaries>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml"/
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
           </ResourceDictionary.MergedDictionaries>

bool? dialogResult = null;
                   RadWindow.Confirm(new DialogParameters()
                   {
                       Owner = this,
                       Closed = (w, x) =>
                       {
                           dialogResult = x.DialogResult;
                       }
                   });
Kalin
Telerik team
 answered on 17 Oct 2014
1 answer
205 views
Hello everyone!  

Im drawing a chart with RadCartesianCharts, and i have to display another value (age) instead custom x value datetime 

the structure for each point series is:

HeightPerson
{
  DateTime DateMeasure { get: set; }
  decimal    Height  { get: set; }
  decimal    Age  { get: set; }
}


and i'm using the following  horizontalAxis configuration:

<telerik:RadCartesianChart.HorizontalAxis>
  <chartView:DateTimeContinuousAxis LabelFitMode="Rotate"
                      LabelFormat="{Binding AxisXformat}"
                      Visibility="{Binding VisibilityAxis}"
                      Title="{Binding TitleX}" />
</telerik:RadCartesianChart.HorizontalAxis>



 and the code where i'm making series


var edadSeries = new LineSeries(){
              ItemsSource = vm.PersonAge,
              Visibility = System.Windows.Visibility.Visible,
             //here is where i'm binding the date, but i would like to bind the "Age" property
             //AnotherCategoryBinding = new PropertyNameDataPointBinding() { PropertyName = "Age" },
             CategoryBinding = new PropertyNameDataPointBinding() { PropertyName = "DateMeasure" },
             ValueBinding = new PropertyNameDataPointBinding() { PropertyName = "Height" },
             BorderBrush = System.Windows.Media.Brushes.Black,
             BorderThickness = new Thickness(1),
};

another solution, could be show only x (datetime) values for datapoint in x axis for try to cheat in another way

regards
Martin Ivanov
Telerik team
 answered on 17 Oct 2014
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?