Telerik Forums
UI for WPF Forum
5 answers
175 views

Hello,

I'm binding on a GridViewDataColumn a custom type using the DataMemberBinding attribute. Having the "Search as you type" feature enabled, the search is not performed on the column.

Which is the correct method to enable the "Search as you type" filter on a Data Column bound to a custom type?

Is there any mehtod to implement a custom logic?

 

Regards.

Maya
Telerik team
 answered on 12 Feb 2016
7 answers
580 views

Hi,

I take the Dynamic Layer example and i try to replace the points by the polylines.

internal List<PolylineData> GetFeatures(
            double upperLeftLat,
            double upperLeftLong,
            double lowerRightLat,
            double lowerRightLong,
            GeomType storeType)
        {
            try
            {
                PolylineData polyline1 = new PolylineData()
                {
                    ShapeFill = new MapShapeFill()
                    {
                        Stroke = new SolidColorBrush(Colors.Red),
                        StrokeThickness = 2
                    }
                };
 
                LocationCollection pt = new LocationCollection
                {
                    new Location(44.6957539183824, 23.3327663758679),
                    new Location(44.1429369264591, 24.7498095849434),
                    new Location(44.5131732087098, 27.4611884843576),
                    new Location(45.2073941930888, 27.9275176988258)
                };
 
                polyline1.Points = pt;
                _listPolylineDatas.Add(polyline1);
                return _listPolylineDatas;

 

But i have an exception : {"Must create DependencySource on same Thread as the DependencyObject."}

Do you have an solution for this issue ?

 

Thank you

Martin Ivanov
Telerik team
 answered on 11 Feb 2016
1 answer
95 views

Hi,

 

in my XAML I use the following TemplateSelector to have a button beside my "SourceFile" property to open a FileDialog to select a filename:

            <local:PropertyGridTemplateSelector x:Key="dataTemplateSelector">
                <local:PropertyGridTemplateSelector.SourceFilePropertyTemplate>
                    <DataTemplate>
                        <Grid Margin="0,0,2,0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <TextBox Text="{Binding SourceFile}" Grid.Column="0"/>
                            <Button Content="..." Width="25" Height="25" Grid.Column="1" Click="SelectFileClick"/>
                        </Grid>
                    </DataTemplate>
                </local:PropertyGridTemplateSelector.SourceFilePropertyTemplate>
                <!-- More templates here -->
            </local:PropertyGridTemplateSelector>

 

    public class PropertyGridTemplateSelector : DataTemplateSelector 
    {
        public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            PropertyDefinition dpi = item as PropertyDefinition;
            
            if (dpi.DisplayName == "SourceFile")
            {
                return SourceFilePropertyTemplate;
            }

            return null;
        }

        public DataTemplate SourceFilePropertyTemplate { get; set; }
    }

 

when I select a file through my file dialog,I want to update the recontrol to reflect the selection I made in my file dialog...

 

Thank's

Alain

Dilyan Traykov
Telerik team
 answered on 11 Feb 2016
1 answer
180 views

Hi, 

I'm making an application which represents data in a GridView and ScheduleView at the same time.

Now I'm looking for a way to bind GridView's rows heights to a ScheduleView row heights to synchronize both components grid lines while scrolling (I have implemented gridview scrolling with scheduleview scrollbar and that was pretty easy).

Sure, I can hardcode GroupHeader height with group header content template selector, but it won't work for a case when few appointments stretches a group.

So, basically I have to get current row heights from ScheduleView, how can I get them even from code-behind?

Twi pics in the attachment.

 

Many thanks,

Denis.

 

Yana
Telerik team
 answered on 11 Feb 2016
1 answer
1.9K+ views

Hi @ll,

 

first: our basics

  • wpf application with implicit styles
  • user is allowed to change the theme on the fly

Now I want to use different foreground colors of a TextBlock

to illustrate a special meaning. Therefore I use the following style:

<Style TargetType="{x:Type TextBlock}" x:Key="CompareStatusStyle">
    <Style.Triggers>
        <DataTrigger Binding="{Binding Status}" Value="{x:Static vm:CompareStatus.Different}">
            <Setter Property="Foreground" Value="Orange"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Status}" Value="{x:Static vm:CompareStatus.OnlyA}">
            <Setter Property="Foreground" Value="Red"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Status}" Value="{x:Static vm:CompareStatus.OnlyB}">
            <Setter Property="Foreground" Value="ForestGreen"/>
        </DataTrigger>
        <DataTrigger Binding="{Binding Status}" Value="{x:Static vm:CompareStatus.Unknown}">
            <Setter Property="Foreground" Value="Gray"/>
        </DataTrigger>
    </Style.Triggers>
</Style>

 

This works mostly very well.

But when I used this Style inside a RadTreeView (header) there are some

problems with background colors. (see the attached image)

 

My question: what is the best way to define colors which might be change

using a different theme or adapt automatically to the background.

 

I found a bad way: using code behind to change the background color

of the SelectionVisual of a RadTreeViewItem. But unfortunately not every

theme is build in the same way and the border defining the background

color is not in path from my content to the RadTreeItem, so finding the

current background color is hard.

 

Has anyone an idea how I can solve this?

 

Thanks a lot.

Best regards

Christian

 

Martin Ivanov
Telerik team
 answered on 11 Feb 2016
8 answers
247 views
I am trying to find the right syntax to add a drop shadow via code behind.
Masha
Telerik team
 answered on 11 Feb 2016
2 answers
275 views

I've set my grid to include this property setting: SelectionMode="Multiple" 

From reading the documentation --  You can select a set of grid rows (not necessarily neighboring). Hold the Ctrl key and click on the rows which you want to be selected. -- I would expect this to behave as a standard multi-select scenario just like any Windows control. However, SelectionMode="Multiple" causes my grid to select each row on which I click -- with or without the Ctrl modifier. I need users to be able to select a new row without having to deselect the original row. It seemed like it should be pretty straightforward, but I'm clearly missing something.

Thanks...

 
 
 
Mark
Top achievements
Rank 1
 answered on 11 Feb 2016
2 answers
143 views
I am using below code snippet but not getting end date on xaxis.[Please refer attached screen print.]
 
I need to show end date irrespective of (Odd/Even)number points. Can you please suggest how to achieve this.
 
public DateTimeContinuousAxis SetTimeInterval(DateTimeContinuousAxis xAxis, int dateCount)
      {
          var range = xAxis.Maximum - xAxis.Minimum;
          double lbs = System.Math.Ceiling(range.TotalDays / 10);
 
          if (lbs > 0 && range.TotalDays / lbs > 5)
          {
              xAxis.MajorStepUnit = TimeInterval.Day;
              xAxis.LabelInterval = 3;//(int)Math.Round(lbs);
              xAxis.LastLabelVisibility = Telerik.Charting.AxisLastLabelVisibility.Visible;
              xAxis.MajorStep = range.TotalDays;
          }
 
          return xAxis;
      }
Dinko | Tech Support Engineer
Telerik team
 answered on 11 Feb 2016
2 answers
160 views

Hi!

I'm trying to add an inline image to a RadRichTextBox by dragging and dropping the image from elsewhere in my application. I noticed that sometimes the image goes partially on top of the previous line as shown in the attached picture. Even when changing the wrapping style between square and top-and-bottom, it doesn't get fixed. 

I wonder what's causing this? Is there a way to work around this? Could it be just my Visual Studio?

Thanks!

Tinja

 

Tinja
Top achievements
Rank 1
 answered on 11 Feb 2016
7 answers
663 views

Hi,

I've been struggling a bit with the radgridview since the Itemssource can be updated somewhere else, but the thing is, it's the full collection that gets updated, and when this happens, the entire sorting/filter is lost.

I assume I have to make sure that only one specific item in the collection gets modified, but not quite sure what the best approach is here, since the collection is filled with Telerik DataAccess entities and if I'm not wrong there is not Inotifyproperty on the entities.

Heiko
Top achievements
Rank 1
 answered on 10 Feb 2016
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
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?