Telerik Forums
UI for WPF Forum
1 answer
355 views

Hello,

How can i bind visibility property of a textbox to  a selecteditem of AutocompleteBox (with NullToVisibilityConverter) in Wpf? This code dont work.

......

.....

 <telerik:RadButton Grid.Column="1"
                                                   HorizontalAlignment="Right"
                                                   Visibility="{Binding Path=SelectedItem, ElementName=RadAutoCompleteBox1, Converter={StaticResource NullToVisibilityConverter}}"
                                                   Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=UserControl}, Path=DataContext.Add}"
                                                   CommandParameter="{Binding Path=.}">
                                    <Image Source="{framework:ApplicationImage ImageX}" Height="16" Width="16"/>
                                </telerik:RadButton>

....

....

 

 <telerik:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate >
                            <telerik:RadAutoCompleteBox DisplayMemberPath="Name"
                                                        TextSearchMode="Contains"
                                                        SearchText="{Binding Path=Name, Mode=TwoWay}"
                                                        AutoCompleteMode="Suggest"
                                                        SelectionMode="Single"        
                                                        VerticalAlignment="Center"
                                                        BoxesItemStyle="{StaticResource RadAutoCompleteBoxStyle}"
NoResultsContentTemplate="{StaticResource
RadAutoCompleteBoxNoResultsContentTemplate}"
                                                        NoResultsContent="{x:Static resources:Translations.lbl_NoMatches}"
ItemsSource="{Binding Path=DataContext.Project.Names,
RelativeSource={RelativeSource AncestorType=telerik:RadGridView}}">

                                <i:Interaction.Triggers>
                                    <i:EventTrigger EventName="LostFocus">
<i:InvokeCommandAction 
Command="{Binding RelativeSource={RelativeSource FindAncestor,
AncestorType=UserControl},
Path=DataContext.NewNameEnteredCommand}"
                                                                CommandParameter="{Binding Path=.}"/>
                                    </i:EventTrigger>
                                </i:Interaction.Triggers>
                            </telerik:RadAutoCompleteBox>
                        </DataTemplate>

                    </telerik:GridViewDataColumn.CellEditTemplate>

Dinko | Tech Support Engineer
Telerik team
 answered on 30 Jan 2019
1 answer
104 views

Hello,

I have a question regarding autocompletebox component. I would like to display an icon right at the cell textbox in GridView if the entered value is not present in the itemsource. Can one solve this over binding? Which is the best way to do that?


                    <telerik:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate >
                            <telerik:RadAutoCompleteBox DisplayMemberPath="Name"
                                                        TextSearchMode="Contains"
                                                        SearchText="{Binding Path=Name, Mode=TwoWay}"
                                                        AutoCompleteMode="Suggest"
                                                        SelectionMode="Single"        
                                                        VerticalAlignment="Center"
                                                        BoxesItemStyle="{StaticResource RadAutoCompleteBoxStyle}"
NoResultsContentTemplate="{StaticResource
RadAutoCompleteBoxNoResultsContentTemplate}"
                                                        NoResultsContent="{x:Static resources:Translations.lbl_NoMatches}"
ItemsSource="{Binding Path=DataContext.Project.Names,
RelativeSource={RelativeSource AncestorType=telerik:RadGridView}}">

                                <i:Interaction.Triggers>
                                    <i:EventTrigger EventName="LostFocus">
<i:InvokeCommandAction 
Command="{Binding RelativeSource={RelativeSource FindAncestor,
AncestorType=UserControl},
Path=DataContext.NewNameEnteredCommand}"
                                                                CommandParameter="{Binding Path=.}"/>
                                    </i:EventTrigger>
                                </i:Interaction.Triggers>
                            </telerik:RadAutoCompleteBox>
                        </DataTemplate>

                    </telerik:GridViewDataColumn.CellEditTemplate>
Dinko | Tech Support Engineer
Telerik team
 answered on 30 Jan 2019
1 answer
184 views

One of  my customers becomes some  times scanned documents, where black and white are exchanged(whinte fonts on black background). Other software displays documents  correct (for example Edge or PDFXchange Viewer). I have figured out that those documents are created with PDF24 programm. Unfortunatly i can not  give you an example because they contains businis secrets and personal information of other peaple.  Could you perhaps help me to fix this behaviour.

 

I examen one Document structure with itext rups. It seems that embeded Pictures are realy with swaped colors. Perhaps I have to Config Control right way to display Document correctly. I use default PdfViewer  settings.

Tanya
Telerik team
 answered on 30 Jan 2019
0 answers
91 views

It is due to the font telerikwebui if invalid format on Windows XP.

You can create a project by wizard, and select Them office 2016, then the result .exe will failed to run on Windows XP.

Xiaroun
Top achievements
Rank 1
 asked on 30 Jan 2019
1 answer
160 views

I'm trying to modify a ComboBox to display items in the dropdown in a specific order. I would like all items that start with the search text displayed first, followed by any items that have a word that starts with the search text and finally all items that contain the search text anywhere in the string.

I was able to do this with an AutoCompleteBox by implementing a custom FilteringBehavior. I tried to do the same on the ComboBox by implementing a custom ComboBoxFilteringBehavior, but no matter what order I return the matching indices in, they always get displayed to the user in the order they appear in the ItemsSource.

Is there any way to change the order in which matched items are displayed in the dropdown?

Thank you!

Martin Ivanov
Telerik team
 answered on 29 Jan 2019
0 answers
99 views

We're having an issue with the docking framework when interacting with unpinned areas within an application that has been integrated with some winforms controls. I've attached a sample application (changed extension from zip) that demonstrates the problem.

The bottom part contains a WinFormsHost which hosts a WpfUserControl. We've had to do it this way in order to incorporate legacy code.

When the bottom part is unpinned, it starts behaving unreliably as soon as you start interacting/clicking other parts of the app in winforms.  Also you will see that on hover, miminized winforms UI hides itself back, rather than “stay in preview” mode. This works fine for WPF content. To make it as close as possible to our actual customer application, I have created the Bottom, Right, Main areas in winforms. Just the left section is pure WPF, which is the only bit that works reliably.

Given our requirement to integrate with WinForms in this way, can we make this work correctly?

Note: we're currently using Telerik v2017.2.614.45

Thanks

Pete

Peter
Top achievements
Rank 1
Veteran
 asked on 29 Jan 2019
14 answers
509 views
The filtering on the RadComboBox works great, but I want to customize it so that when I use a combobox with Filter set to 'Contains', the filtering is done on multiple keywords instead of just one string.
For example, if I type "Apple Banana" into the combobox, I would like the filter to filter down to items containing "Apple" and "Banana" in their text, instead of items containing the string "Apple Banana". Is there a simple way to do this?  I appreciate any advice you can offer.
Dinko | Tech Support Engineer
Telerik team
 answered on 28 Jan 2019
1 answer
447 views

Hi

I have a RadPieChart with a Doughnut series:

   <telerik:RadPieChart x:Name="PieChart">
            <telerik:DoughnutSeries x:Name="PieSeries1" ValueBinding="Value" ItemsSource="{Binding Items}" InnerRadiusFactor="0.4" RadiusFactor="0.8" DefaultSliceStyle="{StaticResource PieSliceStyle}">
                <telerik:PieSeries.LabelDefinitions>
                    <telerik:ChartSeriesLabelDefinition Template="{StaticResource LabelTemplate1}"/>
                </telerik:PieSeries.LabelDefinitions>
            </telerik:DoughnutSeries>
        </telerik:RadPieChart>

This is the label template:

  <DataTemplate x:Key="LabelTemplate1">
            <TextBlock Foreground="#FFB6B6B6"
                       Text="{Binding Path=DataItem.Label}"
                       Visibility="{Binding Path=DataItem.Visibility}"
                       FontSize="18" FontFamily="Segoe UI" TextAlignment="Center" />
        </DataTemplate>

The data objects I bind to in the template implements “INotifyPropertyChanged” and the properties raise the “PropertyChanged” event when changed. This works fine elsewhere.

The labels gets their initial label text/visibility fine. But if I update the values - it is not reflected to the labels.

I bind to the data objects in the “DefaultSliceStyle” too and it works fine when updating.

Any ideas why – and is there an alternative solution?

/Flemming

Dinko | Tech Support Engineer
Telerik team
 answered on 28 Jan 2019
4 answers
128 views

Hello,

I have RadTimeBar

            <telerik:RadTimeBar x:Name="radTimeBar"
                            PeriodStart="{Binding StartDate}" 
                            PeriodEnd="{Binding EndDate}" 
                            VisiblePeriodStart="{Binding VisibleStartDate}" 
                            VisiblePeriodEnd="{Binding VisibleEndDate}"                            
                            SelectionStart="{Binding CurrentTime, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            SelectionChanged="radTimeBar_SelectionChanged"                            
                            ScrollMode="ScrollAndZoom">
                <telerik:RadTimeBar.Intervals>
                    <telerik:MinuteInterval />
                </telerik:RadTimeBar.Intervals>
            </telerik:RadTimeBar>

When I slide the slider thumb to the end the aplication is broken

I don't know how to catch the exception before the crashed

I attached a print screen of the exception

Thanks

David
Top achievements
Rank 1
 answered on 27 Jan 2019
2 answers
1.6K+ views

I'm trying to have a checkbox as a column that fires an event when it is checked or unchecked. The current code does that, but the problem I am facing is that when the grid is loading, it is firing an event for each item in the grid before it displays. Is there a way around this?

                            <telerik:GridViewDataColumn Header="" DataMemberBinding="{Binding IsCheckedInModel, Mode=TwoWay}" >
                                <telerik:GridViewDataColumn.CellTemplate>
                                    <DataTemplate>
                                        <CheckBox IsChecked="{Binding IsCheckedInModel, Mode=TwoWay}" Checked="VarImportance_Checked" Unchecked="VarImportance_Checked"/>
                                    </DataTemplate>
                                </telerik:GridViewDataColumn.CellTemplate>
                            </telerik:GridViewDataColumn>

Thanks,

Nelson

James DAmour
Top achievements
Rank 1
 answered on 25 Jan 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?