Telerik Forums
UI for WPF Forum
1 answer
140 views
Is there any easy way to center a diagram? I believe I may need to use the align feature, but not 100% sure.

I've been using autofit and that centers it however when exporting to an image, even with the bounds set for the entire viewport it doesn't export in the center.

Any ideas on what I can try?
Tina Stancheva
Telerik team
 answered on 04 Oct 2012
1 answer
260 views
Hi,
Am having some issues with the Dropdown content in RadDropDownButton.
I get multiple instances of the dropdown content (attached screen shot).
Below is my xaml.

<telerik:RadDropDownButton AutoOpenDelay="0:0:0.0" Grid.Column="1" Grid.Row="0" FlowDirection="RightToLeft" DropDownButtonPosition="Left" 
                                                       Visibility="{TemplateBinding SearchHistoryListVisibility}" KeepOpen="False" DropDownMaxHeight="170"
                                                       IsOpen="{Binding IsSearchHistoryOpen, Mode=TwoWay}">
                                    <telerik:RadDropDownButton.DropDownContent>
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="{Binding SearchHistoryWidth}" />
                                            </Grid.ColumnDefinitions>
                                            <ListBox Grid.Column="0" FlowDirection="LeftToRight" 
                                                     ItemContainerStyle="{StaticResource SearchHistoryItemStyle}" BorderThickness="0.25" BorderBrush="DarkGray"
                                                     ItemsSource="{Binding Path=SearchHistoryList}" 
                                                     SelectedValue="{Binding Path=SelectedSearchQuery, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                                                     HorizontalAlignment="Stretch" />
                                        </Grid>
                                    </telerik:RadDropDownButton.DropDownContent>
                                </telerik:RadDropDownButton>

Am trying to close the dropdown content on click of a listbox item. Am setting  IsSearchHistoryOpen=false from SelectedSearchQuery property.

This happens only when I specify Mode=TwoWay in 
IsOpen="{Binding IsSearchHistoryOpen, Mode=TwoWay}".
But if I dont specify the twoway mode, the dropdowncontent doesnt close when i click the listbox item.

Any help is much appreciated.

Thanks
Zarko
Telerik team
 answered on 04 Oct 2012
3 answers
160 views
I'm trying to dislpay a text informing the user that more items are loaded on the background of the tree view. I am trying to change the template. As soon as the ItemsPresenter is not a direct child of ScrollViewer the tree stops displaying the items.

Here is my template:

    <ControlTemplate x:Key="RadTreeViewWithLoadingTemplate" TargetType="{x:Type telerik:RadTreeView}">
        <Grid x:Name="RootElement">         
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                <Grid>
                    <ScrollViewer x:Name="ScrollViewer" BorderThickness="0" Background="{x:Null}" CanContentScroll="True" HorizontalScrollBarVisibility="Auto" IsTabStop="False"
                                  Padding="{TemplateBinding Padding}" VerticalScrollBarVisibility="Auto"
                                  Style="{DynamicResource LoadingScrollViewerStyle}">
                        <Grid>
                            <Grid.RowDefinitions>
                              <RowDefinition Height="Auto" />
                              <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <ItemsPresenter/>
                            <TextBlock Text="Loading more items!" Height="20" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="1"/>                       
                    </ScrollViewer>
                    </Grid>
            </Border>
        </Grid>
    </ControlTemplate>

Thanks,
Justyna
Tina Stancheva
Telerik team
 answered on 04 Oct 2012
1 answer
88 views
Hi

With release .Net version 4.0 of wpf diagram, we have overrided the OnPositionChanged to prevent the user to move the chart to the left and upward compared to the position (0,0).   If the coordinates of the diagram exceed the point of origin, the position is reset to the origin point.  Ex.: (10, -10) is converted into (0, -10).
 
We have updated our solution with the beta 4.5 and the behavior has changed. It is impossible to change the Position property of the diagram in the method "OnPositionChanged."

I attache a sample project. The source code is in the class "MyDiagram." Download project here

Could you
restore the original behavior or offer a solution?

Sincerely,

    protected override void OnPositionChanged(Point oldPosition, Point newPosition)
    {
        base.OnPositionChanged(oldPosition, newPosition);
        Point newPoint = newPosition;
 
        if (newPosition.X > 0)
        {
            newPoint.X = 0;
        }
        if (newPosition.Y > 0)
        {
            newPoint.Y = 0;
        }
        //With the 4.0 DLL version, there is no problem to set the new position
        if (newPoint != newPosition)
        {
            this.Position = newPoint;
        }
 
        if (newPoint != newPosition)
        {
            //With the 4.5 DLL version, I need to invoke the method to get the same behaviour
            //but the diagram flikers
            Dispatcher.BeginInvoke(new Action(() =>
                                                  {
                                                      this.Position = newPoint;
                                                  }), DispatcherPriority.Render);
        }
 
        sh.SetText(((int)this.Position.X).ToString("") + "  -  " + ((int)this.Position.Y).ToString(""));
    }
}
Hristo
Telerik team
 answered on 04 Oct 2012
3 answers
189 views

It is not clear to me how one would go about virtualizing vertically.

For example, if one has many possible "groups" in a scroll viewer which are controlled by a single slider they would not want to materialize all of the UI elements.  Subsequently if the query could be broken up by group, they would not want to query the records for all of the groups.

Any ideas or examples out there?
Tsvetie
Telerik team
 answered on 04 Oct 2012
1 answer
323 views
Hi,

I simply want to change the default font of my RadRichTextBox from Times New Roman to Calibri. How do I do this?

My RTB uses a HtmlDataProvider which converts html correctly, however I'm wanting Calibri for the instance where just plain text it set.

From this post, I've tried:
<telerikHtml:HtmlDataProvider Html="{Binding WorkCompleted, Mode=TwoWay}"
RichTextBox="{Binding ElementName=radRichTextBox1}" />
<telerik:RadRichTextBox x:Name="radRichTextBox1"
FontFamily="Calibri" FontSize="16" DocumentInheritsDefaultStyleSettings="True" />
This changes the font size but not the fontfamily.

Thanks
Petya
Telerik team
 answered on 04 Oct 2012
4 answers
125 views
Hi, 
     I have found that if you try to copy a word with apostrophe. It removes apostrophe character in wpf control. But its working fine with silver light control. Any idea, any fix of any work around for the issue. Please suggest some thing in this regard thanks.

Regards,
muhammad
Top achievements
Rank 1
 answered on 04 Oct 2012
10 answers
143 views
Hi,

I use your RadGridView (Version 2012.2.0607.40) in my application to display a grid with e.g. two columns named ColumnA and ColumnB.
The data of the grid is sorted by this SortDescriptor:

<telerik:RadGridView.SortDescriptors>
    <telerik:SortDescriptor Member="ColumnA"
                    SortDirection="Descending" />
</telerik:RadGridView.SortDescriptors>

The grid is bound to an ObservableCollection. Now I want to delete a row if the data of ColumnB of a row is changed to a specific value by the user. So I subscribed to the PropertyChanged Event of my row ViewModel and if the data of ColumnB is changed to the value I remove this row from my ObservableCollection. This works without a problem but the grid is not updated correctly. It removes the last row even if this row was not removed from my collection. Only if I manually reorder the list by clicking on the header of ColumnA, I get the correct data displayed.

Do you have any suggestion how to fix this problem?

Best regards,

Christian
Christian
Top achievements
Rank 1
 answered on 04 Oct 2012
2 answers
125 views
Hello,

I have the need to display controls before and/or after the tab items themselves.

Please see the attached screenshot to demonstrate the behavior I'm after.

How can I accomplish this using the Telerik WPF TabControl?

Thanks for any assistance.
Mark
Top achievements
Rank 1
 answered on 03 Oct 2012
0 answers
76 views
 

We have a class called TestData which contains a string called Header and a list of doubles called Data.  We then add several of these TestData objects to an ObservableCollection<TestData> called UberData. As new data becomes available at run time, we either add items to the Data list of an existing TestData object in the UberData collection , or we add an entirely new TestData object to the collection.  For example we might have an ObservableCollection<TestData> that contains TestData.Header = “Channel1” and TestData.Header=”Channel2”, etc.

 

 

We would like to databind the first column of the grid to the Data list for channel 1, inside the UberData collection, and the second column of the grid to the Data list object for channel 2 etc. In the binding we would like to bind the grids column 1 header to TestData.Header and the data for the grid column to TestData.Data.

 

Is this possible? We have failed to do this with the Microsoft WPF Grid. The general problem has been that we don't know how many collections will be inside the Uber collection as it is dynamic i.e. we don't know how many at design time.

 

The MS Grid control has this behaviour: A data row is created for each object in the collection, and a column is created for each property. The values of the cells in each data row correspond to the property value of each object.

 

Our data is column centric. We need a column for each object in the collection.

 

John
Top achievements
Rank 1
 asked on 03 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?