Telerik Forums
UI for WPF Forum
2 answers
203 views
I would like to enable/disable a filter based on a checkbox and I would like to do it only in XAML.

I can see how it is done in code but ideally I would be able to implement this strickly in XAML. For example: Bind something like IsEnabled to the checked status of a ToggleButton.

In my case, I actually have several toggle buttons which each apply filters to the view.

Thoughts?
Mark
Top achievements
Rank 1
 answered on 21 Jan 2013
2 answers
175 views
I am building a large facility map that will show facility equipment using a RadMap with bitmaps to portray equipment (computers, printers, etc).  MapPinPoint seems to be the best approach to this.  I can successfully add a MapPinPoint to a RadMap with code like this:

Uri uri = new Uri("/Printer.jpg", UriKind.Relative);

MapPinPoint newMapPoint = new MapPinPoint();
newMapPoint.ImageSource = new BitmapImage(uri);
newMapPoint.Text = "Test";
MapLayer.SetLocation(newMapPoint, new Location(19.70240, -154.08088));
informationLayer.Items.Add(newMapPoint);

This displays the image MapPinPoint with the correct image but introduces a zoom issue.  When I zoom in/out, I need the MapPinPoint to keep its scale.  If I zoom in, the image should get larger and I zoom out the image should get smaller.

How do I accomplish this?  Or, is there a better approach to add image items on the map on the fly and have them scale with zooms?

Thanks.
James
Top achievements
Rank 1
 answered on 21 Jan 2013
0 answers
107 views

Hello. I have this code.

<telerik:RadDocking Grid.Column="1">

                <telerik:RadDocking.DocumentHost>

                    <telerik:RadSplitContainer>

                        <telerik:RadPaneGroup prism:RegionManager.RegionName="{x:Static constants:RegionNames.WorkspaceRegion}">

                            <telerik:RadDocumentPane Title="Основная" CanUserClose="False" CanFloat="False"/>

                        </telerik:RadPaneGroup>

                    </telerik:RadSplitContainer>

                </telerik:RadDocking.DocumentHost>

                <telerik:RadSplitContainer InitialPosition="DockedRight" telerik:DockingPanel.InitialSize="200,200">

                    <telerik:RadPaneGroup>

                        <telerik:RadPane Header="Настройки" CanDockInDocumentHost="False" CanUserClose="False">

                        </telerik:RadPane>

                    </telerik:RadPaneGroup>

                </telerik:RadSplitContainer>

            </telerik:RadDocking>

I need to disable RadDocumentPane docking in other groups (only in Document host as in Visual Studio for example). How can I do it?

Thanks.


UPDATE. Sorry I just find answer and understand how it works.

Anton
Top achievements
Rank 1
 asked on 21 Jan 2013
3 answers
97 views
It appears that only the first visible day on my timeline view is being constrained to my 6am to 6pm. The other days always show midnight to midnight. Bug?

Rod Yager
Ivo
Telerik team
 answered on 21 Jan 2013
3 answers
698 views
Hi,

In my WPF MVVM application I have a view with RadTabControl with 4 different TabItems.
I use the tabs to display 4 different categories of items

Visibility Property of each TabItem is bound to a property in my ViewModel.

Now if let say Tab1 and Tab4 are visible and Tab2 and Tab3 hidden I got gaps like this:

[ Tab 1 ] __________________ [ Tab 4] .

How to make  all tab headers to move to the left like this:

[ Tab 1 ] [ Tab 4] __________________  .


(see pseudo-code below)
<telerik:RadTabControl>
    <telerik:RadTabItem Visibility="{Binding Converter={StaticResource boolToVisibilityConverter}, Path=IsTab1Visible}">
        <telerik:RadTabItem.Header>
            <TextBlock>
                <TextBlock.Text>
                    <Binding Path="Tab1"/>
                </TextBlock.Text>
            </TextBlock>
        </telerik:RadTabItem.Header>
    </telerik:RadTabItem>
 
    <telerik:RadTabItem Visibility="{Binding Converter={StaticResource boolToVisibilityConverter}, Path=IsTab2Visible}">
        <telerik:RadTabItem.Header>
            <TextBlock>
                <TextBlock.Text>
                    <Binding Path="Tab2"/>
                </TextBlock.Text>
            </TextBlock>
        </telerik:RadTabItem.Header>
    </telerik:RadTabItem>
     
    <telerik:RadTabItem Visibility="{Binding Converter={StaticResource boolToVisibilityConverter}, Path=IsTab3Visible}">
        <telerik:RadTabItem.Header>
            <TextBlock>
                <TextBlock.Text>
                    <Binding Path="Tab3"/>
                </TextBlock.Text>
            </TextBlock>
        </telerik:RadTabItem.Header>
    </telerik:RadTabItem>
 
    <telerik:RadTabItem Visibility="{Binding Converter={StaticResource boolToVisibilityConverter}, Path=IsTab4Visible}">
        <telerik:RadTabItem.Header>
            <TextBlock>
                <TextBlock.Text>
                    <Binding Path="Tab4"/>
                </TextBlock.Text>
            </TextBlock>
        </telerik:RadTabItem.Header>
    </telerik:RadTabItem>
</telerik:RadTabControl>
Pavel R. Pavlov
Telerik team
 answered on 21 Jan 2013
2 answers
354 views
Hi,

how do you do the slide in of the Option-Menu in your Dashboard-Example?

Thanks
best Regards
WW
ITA
Top achievements
Rank 1
 answered on 21 Jan 2013
1 answer
170 views
Dear all,
Recently I use radgridview and gridViewComboBoxColumn to achieve the goal that users could be insert or update database by dropping down the combobox. How can I get the selected-value to operate the database? My codes are listed as below. May you give me some hints? Thank you.

XAML Code:

<telerik:RadGridView x:Name="gv1"

                             Grid.Row="1"

                             Margin="5"

                             AlternationCount="2"

                             AutoGenerateColumns="False"

                             FontSize="{Binding Source={x:Static local:MySettings.Default},

                                                Path=FontSize,

                                                Mode=OneWay}"

                             IsFilteringAllowed="False"

                             SelectionUnit="FullRow"

                             ShowGroupPanel="False"

                             VirtualizingStackPanel.IsVirtualizing="True"

                             VirtualizingStackPanel.VirtualizationMode="Recycling">

            <telerik:RadGridView.Columns>

                <telerik:GridViewDataColumn DataMemberBinding="{Binding opc_id}"

                                            Header="opc_id"

                                            IsReadOnly="False" />

                <telerik:GridViewDataColumn DataMemberBinding="{Binding ip_address}"

                                            Header="ip_address"

                                            IsReadOnly="False" />

                <telerik:GridViewDataColumn DataMemberBinding="{Binding hmi_user}"

                                            Header="hmi_user"

                                            IsReadOnly="False" />

                <telerik:GridViewDataColumn DataMemberBinding="{Binding description}"

                                            Header="description"

                                            IsReadOnly="False" />

 

                <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding entry_area}"

                                                DisplayMemberPath="description"

                                                Header="entry_area"

                                                IsReadOnly="False"

                                                SelectedValueMemberPath="Id"

                                                UniqueName="entry_area" />

 

            </telerik:RadGridView.Columns>

        </telerik:RadGridView>"

 

 

VB.NET CODE:

 

Private Sub gv1_RowEditEnded(sender As Object, e As Telerik.Windows.Controls.GridViewRowEditEndedEventArgs) Handles gv1.RowEditEnded

        If e.EditAction = GridViewEditAction.Cancel Then

            Exit Sub

        End If

 

        If e.EditOperationType = GridViewEditOperationType.Insert Then

            'Add the new entry to the data base.

 

            Dim opc As New OPC_Profile With {.opc_id = TryCast(e.Row.Cells(0).Content, TextBlock).Text, _

                                 .ip_address = TryCast(e.Row.Cells(1).Content, TextBlock).Text, _

                                 .hmi_user = TryCast(e.Row.Cells(2).Content, TextBlock).Text, _

                                 .description = TryCast(e.Row.Cells(3).Content, TextBlock).Text, _

                                 .entry_area = TryCast(e.Row.Cells(4).Content, LookupElement).ComboBox.Text}

        End If

Yoan
Telerik team
 answered on 21 Jan 2013
5 answers
206 views
Hi,

I would like to bind the visibility property of an annotaiton to a property of my DataContext binded to a checkbox.
It seems that setting the Visibility property of an annotation has no effects.
Is it a bug ? Do i need to remove it from annotation's collection and reinsert it ?

Regards.
Jean-Pierre
Top achievements
Rank 1
 answered on 21 Jan 2013
5 answers
898 views
I've created a DropDownButton which has a sequence of checkboxes and a ok/cancel button pair in the dropdowncontent. The dropdowncontent is not supposed to close unless I click one of the buttons, hit escape, return or click outside the dropdowncontent.

However, the dropdowncontent closes whenever I click the background on the dropdowncontent - which I do occationally because checkboxes are small and hard to hit when in a hurry.

How do I prevent the DropDownContent from disappearing when I click it's background (that is, the grid which holds the entire thing)?

Thanks!
Simon
Top achievements
Rank 1
 answered on 21 Jan 2013
0 answers
47 views

Hello.

I have some custom control (inherits from Control class) and I need to style it as RadWindow (It's need for Mdi window in canvas control). How can I style the control? And how can I save changing theme function on it? Maybe I can use telerik brushes?

Thanks.

Anton
Top achievements
Rank 1
 asked on 20 Jan 2013
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?