Telerik Forums
UI for WPF Forum
1 answer
6 views

Hi,

I tried to use a RadMasketTextInput instead of a standard TextBox, mainly because of the SelectionOnFocus/Selectall property.
Always wotks well, but the width of control doesn't use all the space left in the parent as a TextBox, in the same position, does.
I tried with stackpanel, dockpanel and Grid, this is the attempt with dockpanel:


<DockPanel Grid.Row="0" Grid.Column="0" Margin="12,0,0,0" HorizontalAlignment="Stretch">
				<Label VerticalAlignment="Center" 
Content="{DynamicResource  ResourceKey={x:Static r:ResourcesKeys.NameLabel}}" />
	<t:RadMaskedTextInput 
	  HorizontalAlignment="Stretch"
	 SelectionOnFocus="SelectAll"
         Value="{Binding SorgenteName}"/>			
</DockPanel>

And with textbox:

<DockPanel Grid.Row="0" Grid.Column="0" Margin="12,0,0,0" HorizontalAlignment="Stretch">
				<Label VerticalAlignment="Center" 
				    Content="{DynamicResource  ResourceKey={x:Static r:ResourcesKeys.NameLabel}}" />
				<TextBox 
									  HorizontalAlignment="Stretch"
							Text="{Binding SorgenteName}"/>
			</DockPanel>

With textbox I have the desired layout.

Thank you in advance

Stenly
Telerik team
 answered on 23 Sep 2021
0 answers
5 views

 

Hi,

How do i remove these folders out of build,

can you show me how to set the minimum?And if distributed on the client can I register them in GAC?

Thank you! 

 

Khanh
Top achievements
Rank 1
Iron
 updated question on 23 Sep 2021
1 answer
6 views

Hi,

I haven't used .Net in a while, I've lost some basic knowledge.

Can someone show me how to fix this underline error? 

I am using vb.net.

Please let me know if you need more details. 

 

Thank you!

Khanh
Top achievements
Rank 1
Iron
 answered on 23 Sep 2021
1 answer
5 views
Implement multiple selected text in combobox text area.
Dinko
Telerik team
 answered on 22 Sep 2021
1 answer
10 views

Hi, I have a shapefile from iran in UTM coordinates, I need to add the shape file to WPF, I added the shape file to my C# and XAML but it did not display. how can I resolve this problem ? if I should change the coordinate system, which coordinate system must be choose in Arc Map(GIS)?

C#

        public MainWindow()
        {
            InitializeComponent();
            fillData();
            this.MouseLeftButtonDown += delegate { this.DragMove(); };
            d_table2.ItemsSource = Dmus;
            d_table.ItemsSource = Dmus;
            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
        }

        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            xShapeReader.Source = new Uri("shp9/Export_Output_9.shp", UriKind.Relative);
            xShapeReader.DataSource = new Uri("shp9/Export_Output_9.dbf", UriKind.Relative);
        }

XAML

                        <Grid x:Name="LayoutRoot">
                            <telerik:RadMap x:Name="radMap">
                                <telerik:RadMap.Provider>
                                    <telerik:EmptyProvider/>
                                </telerik:RadMap.Provider>
                                <telerik:InformationLayer x:Name="xInfo">
                                    <telerik:InformationLayer.Reader>
                                        <telerik:MapShapeReader x:Name="xShapeReader"/>
                                    </telerik:InformationLayer.Reader>
                                </telerik:InformationLayer>
                            </telerik:RadMap>

                        </Grid>

Martin Ivanov
Telerik team
 answered on 22 Sep 2021
1 answer
15 views

Hi,

We have made a small extension on the RadGridView to save/load user defined layouts.
What we noticed is that, when we set IsEnabled="{Binding ViewIsViewing}", the grid is always disabled for some reason.
After a long debugging session, we are 200% sure that our ViewIsViewing property is actually set to "True".
But for some reason, the IsEnabled property is set to False.

Is this expected behavior when you extend this UI Element? Or are we overlooking something here?
I can provide more details if needed.

Kind Regards
Tim

Stenly
Telerik team
 answered on 21 Sep 2021
1 answer
7 views

Currently RadGrid has two options for matching: 

MatchAllTerms = AND filter

MatchAnyTerm = OR filter

I'd like a 3rd options : SmartMatch - which should work much like Google searching: 

So, what it should do i make a ranked match by doing an OR filtering and then order by descending of number of matches pr row. 

This way the best matching items will be on top of the grid and the least matching items on the bottom.

This should be fairly easy to implement...

Dinko
Telerik team
 answered on 21 Sep 2021
1 answer
9 views

I've got a Virtual Grid with 29 rows of data and 3 columns.  I want to have a function that copies all of its contents to the clipboard.  My handler looks like this:

    private void RadMenuItem_OnClick(object sender, RadRoutedEventArgs e)
    {
        // Select all cells and then copy them to the clipboard
        VirtualGrid.SelectAll();
        VirtualGrid.CopyToClipboard();
    }

I wrote my event handler for the CopyingCellClipboardContent event to use the cell row and column index to return the data item for whatever cell was requested:


    private void VirtualGrid_OnCopyingCellClipboardContent(object? sender, VirtualGridCellClipboardEventArgs e)
    {

        if (TryGetCellString(e.Cell.RowIndex, e.Cell.ColumnIndex, out var s))
            e.Value = s; 

        Debug.WriteLine($"Copying cell {e.Cell.RowIndex}, {e.Cell.ColumnIndex} => \'{e.Value}\'");
    }

And sure enough, my handler was called 87 times (29 rows x 3 columns).  But every single time it was called, the row and column index was exactly the same -- whatever row and column I had last clicked.   here is some of my debug output





SelectedSellsChanged
Copying
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'


I can visually see the SelectAll() call selecting all the cells.  And my selection mode is Extended.  And it calls my handler the correct number of times.  

So why does it keep asking me for exactly the same cell all 87 times?  Shouldn't those row/column indices be changing?

 

 

Stenly
Telerik team
 answered on 20 Sep 2021
1 answer
11 views

Hi,

We have a gridview where we allow users to create custom expression columns, in the case where the expression they create will return DateTime values we'd like these custom columns to be grouped by date but the default groups on date and time.

I've managed to get this behaviour from data columns by setting the GroupMemberPath to the Date property of the DateTime object but for the expression columns as far as I can tell I can only use it to point towards the data whereas I need the grouping to be based on the result of the expression.

Is it possible to set the GroupMemberPath to the date part of the expression's result / is there any other way of getting the ColumnGroupDescriptor to group the column by the date part of the expression's result?

Stenly
Telerik team
 answered on 20 Sep 2021
1 answer
5 views

https://www.telerik.com/products/wpf/combobox.aspx

The doc above has "if you press a single character, it navigates to the first item starting with that character"

What properties are required to make the RadComboBox work in this way?
I've tried IsTextSearchEnabled="True" and TextSearchMode="StartsWith" but it does not work

I'm guessing that there may be a property to tell it to clear the first letter entered when the user enters another one
e.g. If user enters A then B they want to go to the first entry that starts with B

I have a RadComboBox.ItemTemplate to tell it which property to display
Do I also need to set something to tell it which property to match the typed character against?

Stenly
Telerik team
 answered on 20 Sep 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
Psyduck
Top achievements
Rank 4
Bronze
Bronze
Iron
Liu
Top achievements
Rank 1
Iron
Alex
Top achievements
Rank 1
Veteran
Iron
Iron
George C.
Top achievements
Rank 2
Iron
Veteran
Top users last month
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
Psyduck
Top achievements
Rank 4
Bronze
Bronze
Iron
Liu
Top achievements
Rank 1
Iron
Alex
Top achievements
Rank 1
Veteran
Iron
Iron
George C.
Top achievements
Rank 2
Iron
Veteran