Telerik Forums
UI for WPF Forum
1 answer
146 views
Hey there,

I have a question about the setFloatingLocation() - method. I want to use it to place a floating pane in the middle of the main window of my app, also after the user has resized the main window. The method works fine for the first time I open the floating pane, but when i close the floating pane, resize the main window and then open the floating pane again, it re-opens at the same position it was before. Whay does the setFloatingLocation(pane, setPosition()); not work?

public void OnNewCbs(RadDocking dockingManager)
        {
            RadPane pane = GetPane(dockingManager.Panes, "NewEditCbs");
            if (pane != null)
            {
                RadDocking.SetFloatingLocation(pane, setPosition());
                pane.IsHidden = false;
            }
            else
            {
                pane = new RadPane();
                pane.Header = "New CBS/ Edit current CBS";
                pane.Name = "NewEditCbs";
                Frame frame = new Frame();
                frame.Content = new CbsNewAndEditView();
                pane.Content = frame;
                pane.CanDockInDocumentHost = false;
                ((RadPaneGroup)((RadSplitContainer)dockingManager.DocumentHost).Items[0]).AddItem(pane, DockPosition.Center);
                RadDocking.SetFloatingSize(pane, new Size(470, 740));               
                RadDocking.SetFloatingLocation(pane, setPosition());
                pane.MakeFloatingOnly();
            }
        }
 
        private Point setPosition()
        {
            Double x = ((App)App.Current).MainWindow.Left + (((App)App.Current).MainWindow.ActualWidth / 2.0 - 470.0 / 2.0);
            Double y = ((App)App.Current).MainWindow.Top + (((App)App.Current).MainWindow.ActualHeight / 2.0 - 740.0 / 2.0);
            Point p = new Point(x,y);
            return p;
        }

Thank you for your help!

Regards,
Achim
George
Telerik team
 answered on 28 Aug 2013
0 answers
92 views
Hi,

I have a very strange problem. The Grid below is binding very slow if I do not include Height or MaxHeight. If I do nor include one of these attributes the data appears something like 20 or 30 seconds after the ItemsSource is set. And I have only one thousand registers. If I define the Height or MaxHeight it takes less than one second.

The problem is that I do not want to pre define a Height because I want the Grid to Strech, Vertically and Horizontally, all over the page. But , of course, I want a scroll bar to appear automatically if the number of registers exceed the screen space.

How can I make it work ?

Thanks in advance
<telerik:RadGridView x:Name="RadGridLancamentos" GroupRenderMode="Flat" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
        ItemsSource="{Binding Source={StaticResource ModelLocator}, Path=ListOfObjects}"
        IsReadOnly="True"
        AutoGenerateColumns="False"
        MinHeight="386"
        Height="700"
        CanUserFreezeColumns="False"
        RowIndicatorVisibility="Collapsed"
        CanUserResizeColumns="False">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="Lançamento"
                    DataMemberBinding="{Binding Path=field1}"
                    IsGroupable="False"/>
        <telerik:GridViewDataColumn Header="Título"
                    DataMemberBinding="{Binding Path=field2}"
                    IsGroupable="False"
                    Width="*" />
        <telerik:GridViewDataColumn Header="Favorecido"
                    DataMemberBinding="{Binding Path=field3}"
                    IsGroupable="False"
                    Width="*" />
    </telerik:RadGridView.Columns>
</telerik:RadGridView>


mvbaffa
Top achievements
Rank 1
 asked on 28 Aug 2013
1 answer
178 views
I am currently looking at the RadMenu and specifically your Customisation example from the Demos and was wondering if its possible to have a different image for each of the TopLevelItem's

From the demos

    <Style x:Key="TopLevelItemStyle" TargetType="telerik:RadMenuItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadMenuItem">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.2"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Highlighted">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="HighlightVisual" Storyboard.TargetProperty="Opacity">
                                            <LinearDoubleKeyFrame KeyTime="00:00:00.1" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="HighlightVisual" Fill="{StaticResource TopLevelItemMouseOver}" Opacity="0" />
                        <Image Source="/EPMS UI;component/Assets/Images/Diagnostics.png" Width="180" Height="100" Margin="5"/>
                        <!--<TextBlock x:Name="Text" Text="{TemplateBinding Header}" TextDecorations="None" Foreground="{StaticResource TopLevelItemForeground}" FontWeight="Bold" Margin="20 6 40 6" HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="14"/>-->
                        <Path x:Name="DropDownArrow" Fill="{StaticResource TopLevelItemForeground}" Data="M0,0 L2,0 1,1" Stretch="Uniform" Width="7" Height="5" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="8 0 20 0" />
                        <Popup x:Name="PART_Popup">
                            <Border x:Name="PopupContent" BorderBrush="{StaticResource TopLevelPopupBorder}" BorderThickness="1" Background="{StaticResource TopLevelPopupBackground}" Padding="6">
                                <Border Background="{StaticResource TopLevelInnerBackground}" BorderThickness="1" BorderBrush="{StaticResource TopLevelInnerBorderBrush}">
                                    <ItemsPresenter />
                                </Border>
                            </Border>
                        </Popup>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

You can see that I have replaced the original TextBlock with and Image control and if I hard code it the menu appear as I need it.

<Image Source="/EPMS UI;component/Assets/Images/Diagnostics.png" Width="180" Height="100" Margin="5"/>

But I need different images for each of the top level menu items (People, Diagnostics, Engine Data etc)


Is this possible?

		<telerik:RadMenu Style="{StaticResource MenuStyle}">
			
			<telerik:RadMenuItem Header="People">
 
				<telerik:RadMenuItem.ItemsPanel>
					<ItemsPanelTemplate>
                        <Grid>
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="340" />
								<ColumnDefinition Width="Auto" />
							</Grid.ColumnDefinitions>
						</Grid>
					</ItemsPanelTemplate>
				</telerik:RadMenuItem.ItemsPanel>
 
                <telerik:RadMenuGroupItem Header="People" Style="{StaticResource MenuGroupItemStyle}">
 
                    <telerik:RadMenuItem Icon="/Epms Ui;component/Assets/Images/users.png" Style="{StaticResource IconItemStyle}" Tag="User Maintenance">
                        <telerik:RadMenuItem.Header>
                            <StackPanel>
                                <TextBlock Text="User Maintenance" Style="{StaticResource SubHeader}" />
                                <TextBlock Text="Allows the creation of user accounts and the resetting of user passwords" Style="{StaticResource ParagraphStyle}" />
                            </StackPanel>
                        </telerik:RadMenuItem.Header>
                    </telerik:RadMenuItem>
 
                </telerik:RadMenuGroupItem>
 
			</telerik:RadMenuItem>
			
			<telerik:RadMenuItem Header="Diagnostics">
				<telerik:RadMenuItem Header="Audit List"/>
				<telerik:RadMenuItem Header="Label Print Queue"/>
			</telerik:RadMenuItem>..
 
			<telerik:RadMenuItem Header="Engine Data">
				<telerik:RadMenuItem Header="Engine Types"/>
				<telerik:RadMenuItem Header="Engine Labels"/>
				<telerik:RadMenuItem Header="Engine Numbers"/>
				<telerik:RadMenuItem Header="Engine Characteristics"/>
				<telerik:RadMenuItem Header="Mainline Results"/>
				<telerik:RadMenuItem Header="Six Cylinder line Results"/>
			</telerik:RadMenuItem>
 
			<telerik:RadMenuItem Header="SAP">
				<telerik:RadMenuItem Header="Import SAP Batches"/>
				<telerik:RadMenuItem Header="SAP Interface Status"/>
				<telerik:RadMenuItem Header="Re-order Batches"/>
				<telerik:RadMenuItem Header="Re-order Six Cylinder Batches"/>
				<telerik:RadMenuItem Header="Build Plan Monitor"/>
			</telerik:RadMenuItem>
 
			<telerik:RadMenuItem Header="Schedules">
				<telerik:RadMenuItem Header="SAP Schedule"/>
			</telerik:RadMenuItem>
 
			<telerik:RadMenuItem Header="Reporting">
				<telerik:RadMenuItem Header="Documents"/>
			</telerik:RadMenuItem>
 
		</telerik:RadMenu>

Phil
Top achievements
Rank 1
 answered on 28 Aug 2013
0 answers
98 views
Why is it that this:

<Style TargetType="telerik:GridViewRow" x:Key="MyRowStyle">
    <Setter Property="Background" Value="AliceBlue"></Setter>
</Style>

Is only being applied to rows 0, 2, 4, etc...  Shouldn't it apply to all?
Anthony
Top achievements
Rank 1
 asked on 28 Aug 2013
1 answer
421 views
Hello Admin and all,
Can I use the Telerik map control, with one of the providers such as: OpenStreet, Google
the computer will not be connected to the Internet?
I have a local server at the site/windows C# net application.
I have Google map Tile images (256*256 png) with help of GMapCatcher/ Offline Map Maker but I have no Idea how to use and implement with your control.
Also i am ready to purchase the Paid version of Telerik tool, but i need to sure that's work for me.

Thank you,
Vinay Bansal
Andrey
Telerik team
 answered on 28 Aug 2013
5 answers
451 views
Hi Guys,

We have a bunch of tiles from our own Map server and would like to make these available to the Map Control when there is no internet connection.

Access to the local IIS server cannot be guaranteed, there may not even be one installed on the users machine, so following the logic in the Silverlight blog post about copying the tiles to the local server is not a solution.

Is it possible to have a tiled map provider that reads its images from an assembly, zip file?  We would like to keep the tiles within a single source if possible, having a directory structure with thousands of tiles might work but is cumbersome to maintain and install 

Regards

John

Andrey
Telerik team
 answered on 28 Aug 2013
1 answer
116 views

how to get selected text index position from selected paragraph ?
Iva Toteva
Telerik team
 answered on 28 Aug 2013
1 answer
376 views
Hi,

I wants to select whole paragraph and texts ( words) inside the paragraph with index position.

If it is possible then how ?

or any alternate way ? 

I want to divide this paragraph into three different paragraph on the basis of word index position

Please help
Iva Toteva
Telerik team
 answered on 28 Aug 2013
1 answer
118 views
The WPF Controls Examples contains examples for it but they will never load. All other examples do load.

Also it does not seem to exist in the library:
Error    1    The tag 'RadNumericUpDown' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'.
Wouter
Top achievements
Rank 1
 answered on 28 Aug 2013
1 answer
205 views
Hello,

I am trying to get Drag and Drop to work within a single RadListBox.  I have the ItemsSource and SelectedItem bound (TwoWay).  Whenever I drop an item within the listbox, the SelectedItem setter gets called with a value of null.  I was able to reproduce this by updating the SDK sample "CustomListBoxDragDropBehavior_WPF" with the following:

<telerik:RadListBox ItemContainerStyle="{StaticResource DraggableListBoxItem}"
                            ItemsSource="{Binding Customers1}"
                            SelectedItem="{Binding SelectedCustomer1, Mode=TwoWay}"
private Customer selectedCustomer1;
        public Customer SelectedCustomer1
        {
            get { return selectedCustomer1; }
            set
            {
                selectedCustomer1 = value;
                this.OnPropertyChanged(() => this.SelectedCustomer1);
            }
        }

How do I prevent the selected item to be called with null?

Thanks,
Steve
Kalin
Telerik team
 answered on 28 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?