public override void OnApplyTemplate() { base.OnApplyTemplate(); m_panelOffscreenOffsetX = DefaultOffscreenOffsetX; m_floorSlider = GetTemplateChild("FloorSlider") as Slider; m_floorSlider.ValueChanged += OnSliderValueChanged; m_floorSlider.ApplyTemplate(); m_sliderTickBar = GetTickBar(m_floorSlider); var sliderThumb = GetThumb(m_floorSlider); sliderThumb.DragStarted += OnSliderDragStarted; sliderThumb.DragCompleted += OnSliderDragCompleted; m_floorName = (TextBlock)GetTemplateChild("FloorName"); m_dismissButton = (Button)GetTemplateChild("DismissButton"); m_dismissButton.Click += OnClickDismiss; m_floorPanel = (Grid)GetTemplateChild("FloorPanel"); m_detailsPanel = (Grid)GetTemplateChild("DetailsPanel"); m_detailsPanel.Opacity = 0.0f; var currentPosition = m_floorPanel.RenderTransform.Transform(new Point(0.0, 0.0)); m_floorPanel.RenderTransform = new TranslateTransform(m_panelOffscreenOffsetX, currentPosition.Y); }
public override void OnApplyTemplate() { base.OnApplyTemplate(); m_panelOffscreenOffsetX = ((double)Application.Current.Resources["SliderThumbSize"]) * 2; m_container = GetTemplateChild("Container") as Grid; m_floorSlider = GetTemplateChild("FloorSlider") as Slider; m_floorSlider.ValueChanged += OnSliderValueChanged; m_floorSlider.ApplyTemplate(); m_sliderTickBar = GetTickBar(m_floorSlider); m_sliderThumb = GetThumb(m_floorSlider); m_sliderThumb.DragStarted += OnSliderDragStarted; m_sliderThumb.DragCompleted += OnSliderDragCompleted; m_floorName = (TextBlock)GetTemplateChild("FloorName"); m_dismissButton = (Button)GetTemplateChild("DismissButton"); m_dismissButton.Click += OnClickDismiss; m_floorPanel = (Grid)GetTemplateChild("FloorPanel"); m_detailsPanel = (Grid)GetTemplateChild("DetailsPanel"); m_detailsPanel.Opacity = 0.0f; var currentPosition = m_floorPanel.RenderTransform.Transform(new Point(0.0, 0.0)); m_floorPanel.RenderTransform = new TranslateTransform(m_panelOffscreenOffsetX, currentPosition.Y); var dismissButtonPosition = m_dismissButton.RenderTransform.Transform(new Point(0.0, 0.0)); m_dismissButton.RenderTransform = new TranslateTransform(m_panelOffscreenOffsetX, dismissButtonPosition.Y); m_tutorialView = (InteriorsExplorerTutorialView)GetTemplateChild("InteriorsExplorerTutorialView"); m_tutorialView.Hide(); SetTouchEnabled(false); Hide(); }
public override void OnApplyTemplate() { base.OnApplyTemplate(); m_panelOffscreenOffsetX = DefaultOffscreenOffsetX; m_floorSlider = GetTemplateChild("FloorSlider") as Slider; m_floorSlider.ValueChanged += OnSliderValueChanged; m_floorSlider.ApplyTemplate(); m_sliderTickBar = GetTickBar(m_floorSlider); var sliderThumb = GetThumb(m_floorSlider); sliderThumb.DragStarted += OnSliderDragStarted; sliderThumb.DragCompleted += OnSliderDragCompleted; m_floorName = (TextBlock)GetTemplateChild("FloorName"); m_dismissButton = (Button)GetTemplateChild("DismissButton"); m_dismissButton.Click += OnClickDismiss; m_floorPanel = (Grid)GetTemplateChild("FloorPanel"); m_detailsPanel = (Grid)GetTemplateChild("DetailsPanel"); m_detailsPanel.Opacity = 0.0f; var currentPosition = m_floorPanel.RenderTransform.Transform(new Point(0.0, 0.0)); m_floorPanel.RenderTransform = new TranslateTransform(m_panelOffscreenOffsetX, currentPosition.Y); }