//private void SetUserToken()
        //{
        //    userToken = Cookie.GetCookie("AdminSession");
        //}

        //private void gallerySlider_ValueChanged(object sender, RoutedEventArgs e)
        //{
        //    int galleryIndex = (int)(gallerySlider.Value - 1);
        //    galleryTextBox.Text = galleries[galleryIndex].Namek__BackingField;
        //    currentGalleryTextBox.Text = ((int)gallerySlider.Value).ToString();
        //}

        /// <summary>
        /// Handles the Loaded event of the UserControl control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            //userToken = "7RnTDIQeIJpM3k92N7Ya0qu+vYwmzHb2q/dE+dupBzEKRwY05xdVRq7pRGwsXlgtBZqXdb30fNkkArISu58udQ==";

            //BasicHttpBinding binding = new BasicHttpBinding {Name = "galleryBinding"};
            //EndpointAddress endpointAddress = new EndpointAddress("http://chuckconway.com/api/GalleryService.svc");

            //Load Galleries

            userToken = CookieHelper.GetCookie("Token");
            //userToken = "Vgqpi/hbzA64H5qFhky/5Fo4yGrxagl6aDRlIaSKaMqX6Bdw5moZz7aMPZbHzOcSOsHOYGt013gN7toVoE3UVw==";



            GalleryServiceSoapClient galleriesClient = new GalleryServiceSoapClient();

            galleriesClient.GetAllGalleriesCompleted += galleries_GetAllGalleriesCompleted;

            galleriesClient.GetAllGalleriesAsync(userToken);
        }
        //private void SetUserToken()
        //{
        //    userToken = Cookie.GetCookie("AdminSession");
        //}
        //private void gallerySlider_ValueChanged(object sender, RoutedEventArgs e)
        //{
        //    int galleryIndex = (int)(gallerySlider.Value - 1);
        //    galleryTextBox.Text = galleries[galleryIndex].Namek__BackingField;
        //    currentGalleryTextBox.Text = ((int)gallerySlider.Value).ToString();
        //}
        /// <summary>
        /// Handles the Loaded event of the UserControl control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            //userToken = "7RnTDIQeIJpM3k92N7Ya0qu+vYwmzHb2q/dE+dupBzEKRwY05xdVRq7pRGwsXlgtBZqXdb30fNkkArISu58udQ==";

            //BasicHttpBinding binding = new BasicHttpBinding {Name = "galleryBinding"};
            //EndpointAddress endpointAddress = new EndpointAddress("http://chuckconway.com/api/GalleryService.svc");

            //Load Galleries

               userToken = CookieHelper.GetCookie("Token");
            //userToken = "Vgqpi/hbzA64H5qFhky/5Fo4yGrxagl6aDRlIaSKaMqX6Bdw5moZz7aMPZbHzOcSOsHOYGt013gN7toVoE3UVw==";

            GalleryServiceSoapClient galleriesClient = new GalleryServiceSoapClient();
            galleriesClient.GetAllGalleriesCompleted += galleries_GetAllGalleriesCompleted;

            galleriesClient.GetAllGalleriesAsync(userToken);
        }