コード例 #1
0
 private void OnButtonLoad(object sender, RoutedEventArgs e)
 {
     if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.XamlCompositionBrushBase"))
     {
         Button button = sender as Button;
         Windows.UI.Xaml.Media.AcrylicBrush acrylicBrush = new Windows.UI.Xaml.Media.AcrylicBrush();
         acrylicBrush.BackgroundSource = Windows.UI.Xaml.Media.AcrylicBackgroundSource.HostBackdrop;
         acrylicBrush.TintColor        = Color.FromArgb(255, 0, 99, 177);
         acrylicBrush.FallbackColor    = Color.FromArgb(255, 0, 99, 177);
         acrylicBrush.TintOpacity      = 0.6;
         button.Background             = acrylicBrush;
     }
 }
コード例 #2
0
        private void OnGridLoad(object sender, RoutedEventArgs e)
        {
            if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.XamlCompositionBrushBase"))
            {
                Grid grid = sender as Grid;
                Windows.UI.Xaml.Media.AcrylicBrush acrylicBrush = new Windows.UI.Xaml.Media.AcrylicBrush();
                acrylicBrush.BackgroundSource = Windows.UI.Xaml.Media.AcrylicBackgroundSource.HostBackdrop;
                acrylicBrush.TintColor        = Color.FromArgb(255, 0, 0, 0);
                acrylicBrush.FallbackColor    = Color.FromArgb(255, 0, 0, 0);
                acrylicBrush.TintOpacity      = 0.6;
                grid.Background = acrylicBrush;

                CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
                ApplicationViewTitleBar titleBar = ApplicationView.GetForCurrentView().TitleBar;
                titleBar.ButtonBackgroundColor         = Colors.Transparent;
                titleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
            }
        }
コード例 #3
0
        /// <summary>
        /// Standard dialog, to keep consistency.
        /// Long term, better to put this into base viewmodel class, along with MVVM stuff (NotifyProperyCHanged, etc) and inherrit it.
        /// Note that the Secondarytext can be un-assigned, then the econdary button won't be presented.
        /// Result is true if the user presses primary text button
        /// </summary>
        /// <param name="title">
        /// The title of the message dialog
        /// </param>
        /// <param name="message">
        /// THe main body message displayed within the dialog
        /// </param>
        /// <param name="primaryText">
        /// Text to be displayed on the primary button (which returns true when pressed).
        /// If not set, defaults to 'OK'
        /// </param>
        /// <param name="secondaryText">
        /// The (optional) secondary button text.
        /// If not set, it won't be presented to the user at all.
        /// </param>
        public async Task <bool> ShowDialog(string title, string message, string primaryText = "OK", string secondaryText = null)
        {
            bool result = false;

            try
            {
                if (App.rootFrame != null)
                {
                    var d = new ContentDialog();

                    d.Title             = title;
                    d.Content           = message;
                    d.PrimaryButtonText = primaryText;

                    Windows.UI.Xaml.Media.AcrylicBrush myBrush = new Windows.UI.Xaml.Media.AcrylicBrush();
                    myBrush.BackgroundSource = Windows.UI.Xaml.Media.AcrylicBackgroundSource.Backdrop;
                    myBrush.TintColor        = (Color)App.rootFrame.Resources["SystemAccentColor"];
                    myBrush.FallbackColor    = Color.FromArgb(255, 202, 24, 37);
                    myBrush.TintOpacity      = 0.6;
                    d.Background             = myBrush;

                    if (!string.IsNullOrEmpty(secondaryText))
                    {
                        d.SecondaryButtonText = secondaryText;
                    }
                    var dr = await d.ShowAsync();

                    result = (dr == ContentDialogResult.Primary);
                }
            }
            catch (Exception ex)
            {
            }
            finally
            {
            }

            return(result);
        }
コード例 #4
0
ファイル: MapView.xaml.cs プロジェクト: pnp0a03/WinGo-Maps
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            MapControl = Map;
            if (e.NavigationMode == NavigationMode.Back)
            {
                ChangeViewControl.Map = Map;
            }
            var AllowOverstretch     = SettingsSetters.GetAllowOverstretch();
            var FadeAnimationEnabled = SettingsSetters.GetFadeAnimationEnabled();

            if (InternalHelper.InternetConnection())
            {
                ChangeViewControl.UseGoogleMaps(OnMapControls.ChangeViewUserControl.MapMode.Standard, AllowOverstretch: AllowOverstretch, IsFadingEnabled: FadeAnimationEnabled, ShowTraffic: SettingsSetters.GetShowTrafficOnLaunch());
            }
            else
            {
                Map.TileSources.Add(new MapTileSource(new LocalMapTileDataSource("ms-appdata:///local/MahMaps/mah_x_{x}-y_{y}-z_{zoomlevel}.jpeg"))
                {
                    AllowOverstretch = false, IsFadingEnabled = FadeAnimationEnabled
                });
            }
            inkCanvas.InkPresenter.InputDeviceTypes = CoreInputDeviceTypes.Mouse | CoreInputDeviceTypes.Pen | CoreInputDeviceTypes.Touch;
            var drawingAttr = this.inkCanvas.InkPresenter.CopyDefaultDrawingAttributes();

            drawingAttr.PenTip         = PenTipShape.Rectangle;
            drawingAttr.Size           = new Size(4, 4);
            drawingAttr.IgnorePressure = true;
            drawingAttr.Color          = (Color)Resources["SystemControlBackgroundAccentBrush"];
            this.inkCanvas.InkPresenter.UpdateDefaultDrawingAttributes(drawingAttr);
            if (e.Parameter != null)
            {
                //Google Maps Override
                if (e.Parameter.ToString().StartsWith("http"))
                {
                    //Search Uri association handler
                    if (((Uri)e.Parameter).Segments[2].ToLower() == "search/")
                    {
                        //Searchgrid.PopUP = true;
                        //Searchgrid.SearchText = ((Uri)e.Parameter).DecodeQueryParameters().Where(x => x.Key == "query").FirstOrDefault().Value;
                    }
                    //Directions Uri association handler
                    if (((Uri)e.Parameter).Segments[2].ToLower() == "dir/")
                    {
                        var parameters  = ((Uri)e.Parameter).DecodeQueryParameters();
                        var origin      = parameters.Where(x => x.Key == "origin").FirstOrDefault();
                        var destination = parameters.Where(x => x.Key == "destination").FirstOrDefault();
                        var travelmode  = parameters.Where(x => x.Key == "travelmode").FirstOrDefault();
                        var waypoints   = parameters.Where(x => x.Key == "waypoints").FirstOrDefault();
                        ViewModel.DirectionsControls.DirectionsHelper.DirectionModes Mode = ViewModel.DirectionsControls.DirectionsHelper.DirectionModes.walking;
                        Geopoint OriginPoint        = null;
                        Geopoint DestinationPoint   = null;
                        List <BasicGeoposition> lst = null;
                        if (travelmode.Value != null)
                        {
                            if (travelmode.Value.ToString() == "driving")
                            {
                                Mode = ViewModel.DirectionsControls.DirectionsHelper.DirectionModes.driving;
                            }
                            else if (travelmode.Value.ToString() == "bicycling ")
                            {
                                Mode = ViewModel.DirectionsControls.DirectionsHelper.DirectionModes.bicycling;
                            }
                            else if (travelmode.Value.ToString() == "transit")
                            {
                                Mode = ViewModel.DirectionsControls.DirectionsHelper.DirectionModes.transit;
                            }
                        }
                        if (origin.Value != null)
                        {
                            var latlng    = origin.Value.Split(',');
                            var Latitude  = Convert.ToDouble(latlng[0]);
                            var Longitude = Convert.ToDouble(latlng[1]);
                            OriginPoint = new Geopoint(new BasicGeoposition()
                            {
                                Latitude  = Latitude,
                                Longitude = Longitude
                            });
                        }
                        if (destination.Value != null)
                        {
                            var latlng    = destination.Value.Split(',');
                            var Latitude  = Convert.ToDouble(latlng[0]);
                            var Longitude = Convert.ToDouble(latlng[1]);
                            DestinationPoint = new Geopoint(new BasicGeoposition()
                            {
                                Latitude  = Latitude,
                                Longitude = Longitude
                            });
                        }
                        if (waypoints.Value != null)
                        {
                            lst = new List <BasicGeoposition>();
                            var latlngs = destination.Value.Split('|');
                            foreach (var item in latlngs)
                            {
                                var latlng             = item.Split(',');
                                BasicGeoposition point = new BasicGeoposition();
                                point.Latitude  = Convert.ToDouble(latlng[0]);
                                point.Longitude = Convert.ToDouble(latlng[1]);
                                lst.Add(point);
                            }
                        }
                        if (OriginPoint != null && DestinationPoint != null)
                        {
                            ViewModel.DirectionsControls.DirectionsHelper.Rootobject Result = null;
                            if (lst == null)
                            {
                                Result = await ViewModel.DirectionsControls.DirectionsHelper.GetDirections(OriginPoint.Position, DestinationPoint.Position, Mode);
                            }
                            else
                            {
                                Result = await ViewModel.DirectionsControls.DirectionsHelper.GetDirections(OriginPoint.Position, DestinationPoint.Position, Mode, lst);
                            }
                            if (Result != null)
                            {
                                Map.MapElements.Add(ViewModel.DirectionsControls.DirectionsHelper.GetDirectionAsRoute(Result, (Color)Resources["SystemControlBackgroundAccentBrush"]));
                            }
                        }
                    }
                    //Display a map
                    if (((Uri)e.Parameter).Segments[2].ToLower().StartsWith("@"))
                    {
                        await Task.Delay(1500);

                        try
                        {
                            if (!e.Parameter.ToString().Contains("searchplace"))
                            {
                                var parameters = ((Uri)e.Parameter).DecodeQueryParameters();
                                var mapaction  = parameters.Where(x => x.Key == "map_action").FirstOrDefault();
                                if (mapaction.Value != null && mapaction.Value == "pano")
                                {
                                    await new MessageDialog("StreetView Not Supported yet").ShowAsync();
                                }
                                var center = parameters.Where(x => x.Key == "center").FirstOrDefault();
                                var zoom   = parameters.Where(x => x.Key == "zoom").FirstOrDefault();
                                var cp     = center.Value.Split(',');
                                BasicGeoposition pointer = new BasicGeoposition()
                                {
                                    Latitude = Convert.ToDouble(cp[0]), Longitude = Convert.ToDouble(cp[1])
                                };
                                Map.Center = new Geopoint(pointer);
                                if (zoom.Value != null)
                                {
                                    await Map.TryZoomToAsync(Convert.ToDouble(zoom.Value));
                                }
                                RunMapRightTapped(Map, new Geopoint(pointer));
                            }
                            else
                            {
                                var search = ((Uri)e.Parameter).ToString().Replace("https://google.com/maps/@searchplace=", "");
                                //var search = parameters.Where(x => x.Key == "searchplace").FirstOrDefault();
                                var res = await ViewModel.PlaceControls.SearchHelper.TextSearch(search, Location : Map.Center, Radius : 15000);

                                if (res == null || res.results.Length == 0)
                                {
                                    await new MessageDialog("No search results found").ShowAsync();
                                    return;
                                }
                                var ploc     = res.results.FirstOrDefault().geometry.location;
                                var geopoint = new Geopoint(new BasicGeoposition()
                                {
                                    Latitude = ploc.lat, Longitude = ploc.lng
                                });
                                Map.Center = geopoint;
                                await MapView.MapControl.TryZoomToAsync(16);

                                SearchResultPoint = geopoint;
                            }
                        }
                        catch
                        {
                        }
                    }
                }

                //Windows Maps Override
                else
                {
                    var    parameters = ((Uri)e.Parameter).DecodeQueryParameters();
                    string cp         = "";
                    int    zoomlevel  = 0;
                    string Querry     = "";
                    string Where      = "";
                    //{bingmaps:?where=Tabarsi Square%2C north side of the Shrine%2C Mashhad%2C 2399%2C Īrān}
                    if (parameters.Where(x => x.Key == "where").Any())
                    {
                        Where = Uri.UnescapeDataString(parameters.Where(x => x.Key == "where").FirstOrDefault().Value.NoHTMLString());
                    }
                    if (parameters.Where(x => x.Key == "cp").Any())
                    {
                        cp = parameters.Where(x => x.Key == "cp").FirstOrDefault().Value;
                    }
                    if (parameters.Where(x => x.Key == "lvl").Any())
                    {
                        zoomlevel = Convert.ToInt32(parameters.Where(x => x.Key == "lvl").FirstOrDefault().Value);
                    }
                    if (parameters.Where(x => x.Key == "q").Any())
                    {
                        Querry = parameters.Where(x => x.Key == "q").FirstOrDefault().Value;
                    }
                    if (parameters.Where(x => x.Key == "collection").Any())
                    {
                        var point     = parameters.Where(x => x.Key == "collection").FirstOrDefault().Value;
                        var pointargs = point.Split('_');
                        var latitude  = pointargs[0].Split('.')[1] + "." + pointargs[0].Split('.')[2];
                        var longitude = pointargs[1];
                        cp = $"{latitude}~{longitude}";
                        if (parameters.Count >= 3)
                        {
                            Map.MapElements.Add(new MapIcon()
                            {
                                Location = new Geopoint(new BasicGeoposition()
                                {
                                    Latitude = Convert.ToDouble(latitude), Longitude = Convert.ToDouble(longitude)
                                }), Title = pointargs[2].Replace("+", " ")
                            });
                        }
                        else
                        {
                            Map.MapElements.Add(new MapIcon()
                            {
                                Location = new Geopoint(new BasicGeoposition()
                                {
                                    Latitude = Convert.ToDouble(latitude), Longitude = Convert.ToDouble(longitude)
                                }), Title = "Point"
                            });
                        }
                    }
                    if (Where != "")
                    {
                        await Task.Delay(500);

                        var res = await SearchHelper.TextSearch(Where);

                        if (res != null)
                        {
                            if (res.results != null && res.results.Any())
                            {
                                var loc = res.results.FirstOrDefault().geometry.location;
                                //var rgc = await ReverseGeoCode.GetLocation(Where);
                                Map.Center = new Geopoint(new BasicGeoposition()
                                {
                                    Latitude = loc.lat, Longitude = loc.lng
                                });
                            }
                            else
                            {
                                var rgc = await ReverseGeoCode.GetLocation(Where);

                                Map.Center = rgc;
                            }
                        }
                        else
                        {
                            var rgc = await ReverseGeoCode.GetLocation(Where);

                            Map.Center = rgc;
                        }
                    }
                    if (cp != "")
                    {
                        await Task.Delay(500);

                        var bgp = new BasicGeoposition();
                        bgp.Latitude  = Convert.ToDouble(cp.Split('~')[0]);
                        bgp.Longitude = Convert.ToDouble(cp.Split('~')[1]);
                        Map.Center    = new Geopoint(bgp);
                        Map.MapElements.Add(new MapIcon()
                        {
                            Location = new Geopoint(bgp), Title = "Point"
                        });
                    }
                    if (zoomlevel != 0)
                    {
                        await Map.TryZoomToAsync(zoomlevel);
                    }
                    else
                    {
                        await MapView.MapControl.TryZoomToAsync(16);
                    }
                    if (Querry != "")
                    {
                        await Task.Delay(1500);

                        Searchbar.SearchQuerry = Querry;
                    }
                }
            }

            if (ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.AcrylicBrush"))
            {
                var ac    = new Windows.UI.Xaml.Media.AcrylicBrush();
                var brush = Resources["SystemControlChromeLowAcrylicWindowBrush"] as Windows.UI.Xaml.Media.AcrylicBrush;
                ac                      = brush;
                ac.TintOpacity          = 0.8;
                ac.BackgroundSource     = Windows.UI.Xaml.Media.AcrylicBackgroundSource.HostBackdrop;
                InfoPane.PaneBackground = ac;
            }

            //MapViewVM.LoadPage();
        }
コード例 #5
0
ファイル: MapView.xaml.cs プロジェクト: NGame1/UWPGmaps
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            inkCanvas.InkPresenter.InputDeviceTypes = CoreInputDeviceTypes.Mouse | CoreInputDeviceTypes.Pen | CoreInputDeviceTypes.Touch;
            var drawingAttr = this.inkCanvas.InkPresenter.CopyDefaultDrawingAttributes();

            drawingAttr.PenTip         = PenTipShape.Rectangle;
            drawingAttr.Size           = new Size(4, 4);
            drawingAttr.IgnorePressure = true;
            drawingAttr.Color          = (Color)Resources["SystemControlBackgroundAccentBrush"];
            this.inkCanvas.InkPresenter.UpdateDefaultDrawingAttributes(drawingAttr);
            if (e.Parameter != null)
            {
                //Google Maps Override
                if (e.Parameter.ToString().StartsWith("http"))
                {
                    //Search Uri association handler
                    if (((Uri)e.Parameter).Segments[2].ToLower() == "search/")
                    {
                        //Searchgrid.PopUP = true;
                        //Searchgrid.SearchText = ((Uri)e.Parameter).DecodeQueryParameters().Where(x => x.Key == "query").FirstOrDefault().Value;
                    }
                    //Directions Uri association handler
                    if (((Uri)e.Parameter).Segments[2].ToLower() == "dir/")
                    {
                        var parameters  = ((Uri)e.Parameter).DecodeQueryParameters();
                        var origin      = parameters.Where(x => x.Key == "origin").FirstOrDefault();
                        var destination = parameters.Where(x => x.Key == "destination").FirstOrDefault();
                        var travelmode  = parameters.Where(x => x.Key == "travelmode").FirstOrDefault();
                        var waypoints   = parameters.Where(x => x.Key == "waypoints").FirstOrDefault();
                        ViewModel.DirectionsControls.DirectionsHelper.DirectionModes Mode = ViewModel.DirectionsControls.DirectionsHelper.DirectionModes.walking;
                        Geopoint OriginPoint        = null;
                        Geopoint DestinationPoint   = null;
                        List <BasicGeoposition> lst = null;
                        if (travelmode.Value != null)
                        {
                            if (travelmode.Value.ToString() == "driving")
                            {
                                Mode = ViewModel.DirectionsControls.DirectionsHelper.DirectionModes.driving;
                            }
                            else if (travelmode.Value.ToString() == "bicycling ")
                            {
                                Mode = ViewModel.DirectionsControls.DirectionsHelper.DirectionModes.bicycling;
                            }
                            else if (travelmode.Value.ToString() == "transit")
                            {
                                Mode = ViewModel.DirectionsControls.DirectionsHelper.DirectionModes.transit;
                            }
                        }
                        if (origin.Value != null)
                        {
                            var latlng    = origin.Value.Split(',');
                            var Latitude  = Convert.ToDouble(latlng[0]);
                            var Longitude = Convert.ToDouble(latlng[1]);
                            OriginPoint = new Geopoint(new BasicGeoposition()
                            {
                                Latitude  = Latitude,
                                Longitude = Longitude
                            });
                        }
                        if (destination.Value != null)
                        {
                            var latlng    = destination.Value.Split(',');
                            var Latitude  = Convert.ToDouble(latlng[0]);
                            var Longitude = Convert.ToDouble(latlng[1]);
                            DestinationPoint = new Geopoint(new BasicGeoposition()
                            {
                                Latitude  = Latitude,
                                Longitude = Longitude
                            });
                        }
                        if (waypoints.Value != null)
                        {
                            lst = new List <BasicGeoposition>();
                            var latlngs = destination.Value.Split('|');
                            foreach (var item in latlngs)
                            {
                                var latlng             = item.Split(',');
                                BasicGeoposition point = new BasicGeoposition();
                                point.Latitude  = Convert.ToDouble(latlng[0]);
                                point.Longitude = Convert.ToDouble(latlng[1]);
                                lst.Add(point);
                            }
                        }
                        if (OriginPoint != null && DestinationPoint != null)
                        {
                            ViewModel.DirectionsControls.DirectionsHelper.Rootobject Result = null;
                            if (lst == null)
                            {
                                Result = await ViewModel.DirectionsControls.DirectionsHelper.GetDirections(OriginPoint.Position, DestinationPoint.Position, Mode);
                            }
                            else
                            {
                                Result = await ViewModel.DirectionsControls.DirectionsHelper.GetDirections(OriginPoint.Position, DestinationPoint.Position, Mode, lst);
                            }
                            if (Result != null)
                            {
                                Map.MapElements.Add(ViewModel.DirectionsControls.DirectionsHelper.GetDirectionAsRoute(Result, (Color)Resources["SystemControlBackgroundAccentBrush"]));
                            }
                        }
                    }
                    //Display a map
                    if (((Uri)e.Parameter).Segments[2].ToLower().StartsWith("@"))
                    {
                        await Task.Delay(1500);

                        try
                        {
                            if (!e.Parameter.ToString().Contains("searchplace"))
                            {
                                var parameters = ((Uri)e.Parameter).DecodeQueryParameters();
                                var mapaction  = parameters.Where(x => x.Key == "map_action").FirstOrDefault();
                                if (mapaction.Value != null && mapaction.Value == "pano")
                                {
                                    await new MessageDialog("StreetView Not Supported yet").ShowAsync();
                                }
                                var center = parameters.Where(x => x.Key == "center").FirstOrDefault();
                                var zoom   = parameters.Where(x => x.Key == "zoom").FirstOrDefault();
                                var cp     = center.Value.Split(',');
                                BasicGeoposition pointer = new BasicGeoposition()
                                {
                                    Latitude = Convert.ToDouble(cp[0]), Longitude = Convert.ToDouble(cp[1])
                                };
                                Map.Center = new Geopoint(pointer);
                                if (zoom.Value != null)
                                {
                                    Map.ZoomLevel = Convert.ToDouble(zoom.Value);
                                }
                                RunMapRightTapped(Map, new Geopoint(pointer));
                            }
                            else
                            {
                                var search = ((Uri)e.Parameter).ToString().Replace("https://google.com/maps/@searchplace=", "");
                                //var search = parameters.Where(x => x.Key == "searchplace").FirstOrDefault();
                                var res = await ViewModel.PlaceControls.SearchHelper.TextSearch(search, Location : Map.Center, Radius : 15000);

                                if (res == null || res.results.Length == 0)
                                {
                                    await new MessageDialog("No search results found").ShowAsync();
                                    return;
                                }
                                var ploc     = res.results.FirstOrDefault().geometry.location;
                                var geopoint = new Geopoint(new BasicGeoposition()
                                {
                                    Latitude = ploc.lat, Longitude = ploc.lng
                                });
                                Map.Center        = geopoint;
                                Map.ZoomLevel     = 16;
                                SearchResultPoint = geopoint;
                            }
                        }
                        catch
                        {
                        }
                    }
                }

                //Windows Maps Override
                else
                {
                    var    parameters = ((Uri)e.Parameter).DecodeQueryParameters();
                    string cp         = "";
                    int    zoomlevel  = 0;
                    string Querry     = "";
                    if (parameters.Where(x => x.Key == "cp").Any())
                    {
                        cp = parameters.Where(x => x.Key == "cp").FirstOrDefault().Value;
                    }
                    if (parameters.Where(x => x.Key == "lvl").Any())
                    {
                        zoomlevel = Convert.ToInt32(parameters.Where(x => x.Key == "lvl").FirstOrDefault().Value);
                    }
                    if (parameters.Where(x => x.Key == "q").Any())
                    {
                        Querry = parameters.Where(x => x.Key == "q").FirstOrDefault().Value;
                    }
                    if (parameters.Where(x => x.Key == "collection").Any())
                    {
                        var point     = parameters.Where(x => x.Key == "collection").FirstOrDefault().Value;
                        var pointargs = point.Split('_');
                        var latitude  = pointargs[0].Split('.')[1] + "." + pointargs[0].Split('.')[2];
                        var longitude = pointargs[1];
                        cp = $"{latitude}~{longitude}";
                    }
                    if (cp != "")
                    {
                        await Task.Delay(500);

                        var bgp = new BasicGeoposition();
                        bgp.Latitude  = Convert.ToDouble(cp.Split('~')[0]);
                        bgp.Longitude = Convert.ToDouble(cp.Split('~')[1]);
                        Map.Center    = new Geopoint(bgp);
                    }
                    if (zoomlevel != 0)
                    {
                        Map.ZoomLevel = zoomlevel;
                    }
                    else
                    {
                        Map.ZoomLevel = 16;
                    }
                    if (Querry != "")
                    {
                        await Task.Delay(1500);

                        Searchbar.SearchQuerry = Querry;
                    }
                }
            }
            if (ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.AcrylicBrush"))
            {
                var ac    = new Windows.UI.Xaml.Media.AcrylicBrush();
                var brush = Resources["SystemControlChromeLowAcrylicWindowBrush"] as Windows.UI.Xaml.Media.AcrylicBrush;
                ac                      = brush;
                ac.TintOpacity          = 0.8;
                ac.BackgroundSource     = Windows.UI.Xaml.Media.AcrylicBackgroundSource.HostBackdrop;
                InfoPane.PaneBackground = ac;
            }
        }