This is a migrated thread and some comments may be shown as answers.

Placement Issues with ModalWindow

3 Answers 57 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Matthew
Top achievements
Rank 1
Matthew asked on 08 Jul 2012, 03:30 PM
OK, I really think I'm missing something here guys. Below is the widow that I'm trying to display. I want it to pop at the top like the RadMessageBox does. Here's a list of things I've tried.

  • Used the TopCenter value on the Placement property, it did pop at the top but the window contents went off the screen on both ends.
  • Used the PlacementTarget for the page and FitToPlacementTarget for the size, the content ends up centered on the screen which i could live with but when you try to set margins on the first Grid in the window you guys are doing something internally to the Margins and they don't come out right.
  • Did the same as above on the first "LayoutRoot" Grid.
  • Did the same as above but set the content to RootFrame from the 'App' class in code.
  • On each of those three things I tried playing with Vertical Alignment to push it to the top, only served to screw up the Margins like from above.

Like I said, here's the window, very simple usage:

<telerikPrimatives:RadModalWindow x:Name="reminderView">
    <Grid Background="{StaticResource PhoneBackgroundBrush}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
 
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
 
        <TextBlock Grid.ColumnSpan="2" Margin="12" Style="{StaticResource PhoneTextNormalStyle}" Text="{Binding LocalizedResources.ReminderMessageText, Source={StaticResource LocalizedStrings}}" TextWrapping="Wrap" />
        <TextBlock Grid.Row="1" Style="{StaticResource PhoneTextSubtleStyle}" Text="{Binding LocalizedResources.ReminderDateText, Source={StaticResource LocalizedStrings}}" />
        <telerikInput:RadDatePicker Grid.Row="2" Grid.ColumnSpan="2" Value="{Binding ReminderDate, Mode=TwoWay}" />
        <TextBlock Grid.Row="3" Style="{StaticResource PhoneTextSubtleStyle}" Text="{Binding LocalizedResources.ReminderTimeText, Source={StaticResource LocalizedStrings}}" />
        <telerikInput:RadTimePicker Grid.Row="4" Grid.ColumnSpan="2" Value="{Binding ReminderTime, Mode=TwoWay}" />
 
        <Button Grid.Row="5" Content="ok" />
        <Button Grid.Row="5" Grid.Column="1" Content="cancel" />
    </Grid>
</telerikPrimatives:RadModalWindow>

HELP!

3 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 09 Jul 2012, 10:45 AM
Hi Matthew,

Thanks for writing.
Just set these properties on RadModalWindow:

IsFullScreen="True"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Top"
Please write again if you need further assistance.

All the best,
Victor
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Matthew
Top achievements
Rank 1
answered on 09 Jul 2012, 11:51 AM
Victor, as always you rock bro. It even loves my margins now!
0
Vitalii
Top achievements
Rank 2
answered on 03 Oct 2013, 07:08 PM
Perfect properties for window, which holds RadListPicker.
Tags
Window
Asked by
Matthew
Top achievements
Rank 1
Answers by
Victor
Telerik team
Matthew
Top achievements
Rank 1
Vitalii
Top achievements
Rank 2
Share this question
or