Telerik Forums
UI for WPF Forum
2 answers
109 views
Hi 

I'm developing a Surface v2.0 application and I'm using book control to display images (converted from a pdf document). I'm containing the control in a ScatterViewItem to allow the book to be resizable and draggable. This is all working fine. 

My problem is when trying to turn the page, any drag motion moves the ScatterViewItem and doesn't turn the page. A Single/Double tap on the corner of the page does turn the page though but isn't intuitive enough to be useful.

Does anyone have experience in using the control in a Surface app and knows how to enable the page turn please (I know it's a bit of a long shot).

 I've included the Xaml I'm using below

<s:ScatterView AllowDrop="True" x:Name="myScatter" HorizontalAlignment="Stretch"
                                     VerticalAlignment="Stretch"
                                     Background="Transparent" >
         
       
            <s:ScatterViewItem Height="500" Width="600">
                <telerik:RadBook x:Name="RadBook1" RightPageIndex="1" FirstPagePosition="left" Margin="10">
                    <telerik:RadBookItem>
                        <Image Source="pr001.png"/>
                    </telerik:RadBookItem>
                    <telerik:RadBookItem>
                        <Image Source="pr002.png" />
                    </telerik:RadBookItem>
                    <telerik:RadBookItem>
                        <Image Source="pr003.png" />
                    </telerik:RadBookItem>
                    <telerik:RadBookItem>
                        <Image Source="pr004.png"/>
                    </telerik:RadBookItem>
                </telerik:RadBook>
            </s:ScatterViewItem>
            </s:ScatterView>

Iestyn
Top achievements
Rank 1
 answered on 08 Oct 2012
13 answers
187 views
Hi guys,
I need your professional support.

The current behaviour of autocomplete logic is to complete typed characters with appropriate string value. I would like to have another behaviour if it is possible: when you type the characters, combobox will show all possible items in dropdown menu of the combobox and user will be able to select the item from the filtered list.

Thanks in advance,
Julian




Ivo
Telerik team
 answered on 08 Oct 2012
3 answers
126 views
Maybe a simple question, how do I get a column name from a QueryableCollectionView?
Best regards
Vlad
Telerik team
 answered on 08 Oct 2012
2 answers
191 views
Hi,

I try to change the grid's default office_black theme's orange/yellow shades to blue shades but I'm pretty stuck, specially with the column header and scrollbar. I tried following the description from  article but no chance... Could you please help me out with an example (using latest version and blend4)?

Thank you,
joe
phuoc tran ngoc
Top achievements
Rank 1
 answered on 07 Oct 2012
4 answers
84 views
I've got 2 controls on a page, one for a request date and another for the date of birth of a client.  Both of these values come from a SQL Server database.  During the Page_Loaded event I had been trying to calculate the age of the client on the request date, however that's not working.  For some reason, which I don't understand, the date of birth of the client is wrong (it turns out to be today's date), during the Page_Loaded event.  However, once the page is actually displayed, it is correct.  I had thought Page_Loaded would have been the correct event to put this code, but that doesn't seem to be the case.
 
So, where should I put the age calculation code?  In what event?

The XAML for the first control is:
<telerik:RadMaskedDateTimeInput Name="radReqDate" MinWidth="80" TabIndex="0" FontWeight="Bold"
                               Value="{Binding RequestDate}" InputBehavior="Replace" TextMode="PlainText"
                               SelectionOnFocus="SelectAll" ValueChanged="radReqDate_ValueChanged" />

and the XAML for the second control is here:
<telerik:RadMaskedDateTimeInput Name="radDOB" EmptyContent="Enter DOB" MinWidth="80" TabIndex="14"
                               FontWeight="Bold" InputBehavior="Replace" TextMode="PlainText"
                               Value="{Binding Path=DateOfBirth, Mode=TwoWay}" ValueChanged="radDOB_ValueChanged" />

Rod
Top achievements
Rank 1
 answered on 05 Oct 2012
1 answer
226 views
What is the proper way to use a template selector for RadGridView? Templates are currently not being selected and my SelectTemplate method in DetailsTemplateSelector is not being called. I'm using this currently:

<telerik:RadGridView.RowDetailsTemplate>
                <DataTemplate>
                    <ItemsControl
                           ItemTemplateSelector="{StaticResource detailsTemplateSelector}"
                           />
                </DataTemplate>
            </telerik:RadGridView.RowDetailsTemplate>

Resources:

<Window.Resources>
        <DataTemplate x:Key="theBasicView">
            <controls:InfoDetailsControl InfoDetail="{Binding InfoDetails}" />
        </DataTemplate>


        <DataTemplate x:Key="theTableView">
            <telerik:RadGridView ItemsSource="{Binding DetailsTable}"
                                         ShowGroupPanel="False"
                                         AutoGenerateColumns="True"
                                         ColumnBackground="Beige"
                                         RowIndicatorVisibility="Hidden"
                                         AlternationCount="2"
                                         />
        </DataTemplate>


        <analysis:DetailsTemplateSelector 
            BasicView="{StaticResource theBasicView}"
            TableView="{StaticResource theTableView}"
            x:Key="detailsTemplateSelector"
            />
    </Window.Resources>

Code behind:

public class DetailsTemplateSelector : DataTemplateSelector
    {
        public DataTemplate BasicView { get; set; }
        public DataTemplate TableView { get; set; }


        public override DataTemplate SelectTemplate(object item, DependencyObject container) {
            FrameworkElement element = container as FrameworkElement;
            if (element != null && item != null && item is ViewableRuleResult)
            {
                ViewableRuleResult ruleResult = item as ViewableRuleResult;
                Window window = Application.Current.MainWindow;


                if (ruleResult.DetailsTable == null)
                {
                    return BasicView;
                }
                else
                {
                    return TableView;
                }             
            }
            return null;
        }
    }
Tory
Top achievements
Rank 1
 answered on 05 Oct 2012
1 answer
92 views
Hi,

acually in my application, we use the OfficeBlue theme. In our application we have many RadExpanders and with this theme, all RadExpanders are all white. I want to know how I can change the style of the RadExpander to reflect the style of the RadButton (gradient, etc...)

Thank's
Tina Stancheva
Telerik team
 answered on 05 Oct 2012
1 answer
99 views
Hi,

with the PersistenceFramework, I would like to know if it's possible to persist only the layou of my control, not the dat inside of it?

Thank's
Tina Stancheva
Telerik team
 answered on 05 Oct 2012
5 answers
260 views
I'm trying to make built-in filtering work with a comboboxcolumn.
My GridView is bound to an ObservableCollection of Racer entities.
Each Racer entity has a BikeID property (of type Guid) and a Bike navigation property (of type Bike).
My ViewModel has a class BikeService which has an Items Collection of ComboItemViewModel,
which in turn has "ID" and "Description" public properties.
The following code seems to be working, except for the distinct values part of the filtering control.
Basically, I get an exception for each distinct value because the filtering control is trying to parse
them as Guid, even if I instructed the GridView to filter on Bike.Description, which is a string.

Exception text:
System.Windows.Data Error: 17 : Cannot get 'ConvertedValue' value (type 'Object') from ''
(type 'DistinctValueViewModel'). BindingExpression:Path=ConvertedValue; DataItem='DistinctValueViewModel'
(HashCode=52842714); target element is 'CheckBox' (Name=''); target property is 'Content' (type 'Object')
TargetInvocationException:'System.Reflection.TargetInvocationException:
Eccezione generata dalla destinazione di una chiamata. --->
System.FormatException: Il GUID deve contenere 32 cifre, separate da quattro trattini (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

<
telerik:GridViewComboBoxColumn
                Header="Bike"
                DataMemberBinding="{Binding BikeID}"
                SortMemberPath="Bike.Description"
                FilterMemberPath="Bike.Description"
                      FilterMemberType="{x:Type sys:String}"
                ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.BikeService.Items}"
                SelectedValueMemberPath="ID"
                DisplayMemberPath="Description" />

I suspect this is a bug, or maybe this is not supported by the current version of GridView.

Thanks in advance,
Samuele Ruggieri
Rossen Hristov
Telerik team
 answered on 05 Oct 2012
3 answers
145 views
hello i have a multipage tif file and i am looking for a solution to
show the tif-image and also have the possibility to turn over all
included pages. Is this possible?
Steve
Telerik team
 answered on 05 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?