Index: extensions/PiwigoLib/PiwigoLib/Service/PwgCategoriesService.cs
===================================================================
--- extensions/PiwigoLib/PiwigoLib/Service/PwgCategoriesService.cs	(revision 11926)
+++ extensions/PiwigoLib/PiwigoLib/Service/PwgCategoriesService.cs	(revision 11935)
@@ -42,5 +42,5 @@
                 else
                 {
-                    returnValue = ConvertProxyResponseToDTO(response);
+                    returnValue = ConvertProxyResponseToDTO(response, CatgeroryId);
                 }
             }
@@ -79,5 +79,5 @@
                 else
                 {
-                    returnValue = ConvertProxyResponseToDTO(response);
+                    returnValue = ConvertProxyResponseToDTO(response, null);
                 }
             }
@@ -346,5 +346,5 @@
         /// <param name="response"></param>
         /// <param name="session"></param>
-        internal static List<PwgCategory> ConvertProxyResponseToDTO(PwgCategoriesProxyResponse response)
+        internal static List<PwgCategory> ConvertProxyResponseToDTO(PwgCategoriesProxyResponse response, Int32? CatgeroryId)
         {
             List<PwgCategory> returnValue = new List<PwgCategory>();
@@ -352,5 +352,8 @@
             foreach (PwgCategoryProxyResponse respCat in response.Categories)
             {
-                returnValue.Add(ConvertProxyResponseToDTO(respCat));
+                if ((!CatgeroryId.HasValue) || (CatgeroryId.Value != respCat.Id))
+                {
+                    returnValue.Add(ConvertProxyResponseToDTO(respCat));
+                }
             }
 
Index: extensions/PiwigoLib/PiwigoWpf/App.xaml
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/App.xaml	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/App.xaml	(revision 11935)
@@ -8,5 +8,5 @@
         <ObjectDataProvider x:Name="ImagesODP" x:Key="Images" ObjectType="{x:Type piwigo:PwgImageListWPF}"/> <!--IsAsynchronous="True"-->
         <ObjectDataProvider x:Name="SessionODP" x:Key="Session" ObjectType="{x:Type piwigo:PwgSessionWPF}" />
-        <ObjectDataProvider x:Name="CategoriesODP" x:Key="Categories" ObjectType="{x:Type piwigo:PwgCategoryListWPF}"/> <!--IsAsynchronous="True"-->
+        <ObjectDataProvider x:Name="CategoriesODP" x:Key="Categories" ObjectType="{x:Type piwigo:PwgRootCategoryListWPF}"/> <!--IsAsynchronous="True"-->
         <!--IsAsynchronous="True"-->
         <ResourceDictionary  x:Key="VisualStyleApp" Source="VisualStyleApp.xaml"/>
Index: extensions/PiwigoLib/PiwigoWpf/App.xaml.cs
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/App.xaml.cs	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/App.xaml.cs	(revision 11935)
@@ -3,4 +3,5 @@
 using Com.Piwigo.Lib.IService;
 using Com.Piwigo.Wpf.DTO;
+using Com.Piwigo.Wpf.DTO.Helper;
 
 namespace Com.Piwigo.Wpf
@@ -15,10 +16,13 @@
         {
 
+            PwgModelManager.WPF_SynchronizationContext = System.Threading.SynchronizationContext.Current;
+
             PwgServiceProvider.Instance.PwgSetupService.Setup( "Com.Piwigo.Wpf.PiwigoWPF", null, null);
 
              // Model object was created in the app.xaml, so we have to link to them
             PwgModelManager.Instance.Session = (PwgSessionWPF)(this.Resources["Session"] as ObjectDataProvider).Data;
-            PwgModelManager.Instance.CategoryList = (PwgCategoryListWPF)(this.Resources["Categories"] as ObjectDataProvider).Data;
+            PwgModelManager.Instance.CategoryList = (PwgRootCategoryListWPF)(this.Resources["Categories"] as ObjectDataProvider).Data;
             PwgModelManager.Instance.ImageList = (PwgImageListWPF)(this.Resources["Images"] as ObjectDataProvider).Data;
+            //PwgCategoryListWPFHelper.InitRootCategory();
 
             PwgModelManager.Instance.Session.ServeurName = global::Com.Piwigo.Wpf.Properties.Settings.Default.ServerNameData;
Index: extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdConnect.cs
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdConnect.cs	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdConnect.cs	(revision 11935)
@@ -36,8 +36,11 @@
                 PwgSessionWPFHelper.AddPwgSessionInfoToPwgSessionWPF(sess, ref sesWPF);
 
-                List<PwgCategory> lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetListOfCategory(null, false, null); //(PwgModelManager.Instance.Session.Status == PwgSessionStatusEnum.Guest)
-                PwgCategoryListWPF lstCatWPF = PwgModelManager.Instance.CategoryList;
+                PwgCategoryListWPFHelper.InitRootCategory();
 
-                PwgCategoryListWPFHelper.ConvertPwgCategoryListToPwgCategoryListWPF(lstCat, ref lstCatWPF);
+                List<PwgCategory> lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetListOfCategory(null, null, null); //(PwgModelManager.Instance.Session.Status == PwgSessionStatusEnum.Guest)
+                PwgRootCategoryWPF aRootCatWPF = PwgModelManager.Instance.RootCategoryList;
+
+                PwgCategoryListWPFHelper.ConvertPwgCategoryListToPwgRootCategoryWPF(lstCat, ref aRootCatWPF);
+                aRootCatWPF.IsExpanded = true;
 
                 SendUiInfo("Setting up cache data ...");
Index: extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdDisconnect.cs
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdDisconnect.cs	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdDisconnect.cs	(revision 11935)
@@ -32,4 +32,10 @@
                 }
 
+                if ((PwgModelManager.Instance.CategoryList != null)
+                    && (PwgModelManager.Instance.RootCategoryList != null))
+                {
+                    PwgModelManager.Instance.RootCategoryList.Childrens.Clear();
+                }
+
                 if (PwgModelManager.Instance.CategoryList != null)
                 {
Index: extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdGetImageforCategory.cs
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdGetImageforCategory.cs	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdGetImageforCategory.cs	(revision 11935)
@@ -28,4 +28,5 @@
                     PwgImageListWPF lstImgWPF = PwgModelManager.Instance.ImageList;
                     SendUiInfo("Removing image...");
+                    PwgModelManager.Instance.ImageShown = null;
                     if (lstImgWPF != null)
                     {
Index: extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdProvider.cs
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdProvider.cs	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdProvider.cs	(revision 11935)
@@ -24,7 +24,9 @@
                     objICom = PwgCmdGetImageforCategory;
                     break;
+                case "PwgCmdGetSubCategorieforCategory":
+                    objICom = PwgCmdGetSubCategorieforCategory;
+                    break;
                 default:
-                    objICom = null;
-                    break;
+                    throw new ArgumentException("AsyncCommand GetByType : Command Type unknow.", "Type");
             }
 
@@ -70,4 +72,18 @@
             }
         }
+
+        public static AsyncCommand _pwgCmdGetSubCategorieforCategory;
+        public static AsyncCommand PwgCmdGetSubCategorieforCategory
+        {
+            get
+            {
+                if (_pwgCmdGetSubCategorieforCategory == null)
+                {
+                    _pwgCmdGetSubCategorieforCategory = new PwgCmdGetSubCategorieforCategory();
+                }
+                return _pwgCmdGetSubCategorieforCategory;
+            }
+        }
+
     }
 }
Index: extensions/PiwigoLib/PiwigoWpf/DTO/AsyncObservableCollection.cs
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/DTO/AsyncObservableCollection.cs	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/DTO/AsyncObservableCollection.cs	(revision 11935)
@@ -8,6 +8,5 @@
 {
     public class AsyncObservableCollection<T> : ObservableCollection<T>
-    {
-        private SynchronizationContext _synchronizationContext = SynchronizationContext.Current;
+    {        
 
         public AsyncObservableCollection()
@@ -22,5 +21,5 @@
         protected override void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
         {
-            if (SynchronizationContext.Current == _synchronizationContext)
+            if (SynchronizationContext.Current == PwgModelManager.WPF_SynchronizationContext)
             {
                 // Execute the CollectionChanged event on the current thread
@@ -30,5 +29,5 @@
             {
                 // Send the CollectionChanged event on the creator thread
-                _synchronizationContext.Send(RaiseCollectionChanged, e);
+                PwgModelManager.WPF_SynchronizationContext.Send(RaiseCollectionChanged, e);
             }
         }
@@ -42,5 +41,5 @@
         protected override void OnPropertyChanged(PropertyChangedEventArgs e)
         {
-            if (SynchronizationContext.Current == _synchronizationContext)
+            if (SynchronizationContext.Current == PwgModelManager.WPF_SynchronizationContext)
             {
                 // Execute the PropertyChanged event on the current thread
@@ -49,6 +48,6 @@
             else
             {
-                // Post the PropertyChanged event on the creator thread
-                _synchronizationContext.Post(RaisePropertyChanged, e);
+                // Send the PropertyChanged event on the creator thread
+                PwgModelManager.WPF_SynchronizationContext.Send(RaisePropertyChanged, e);
             }
         }
Index: extensions/PiwigoLib/PiwigoWpf/DTO/Helper/PwgCategoryListWPFHelper.cs
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/DTO/Helper/PwgCategoryListWPFHelper.cs	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/DTO/Helper/PwgCategoryListWPFHelper.cs	(revision 11935)
@@ -34,4 +34,5 @@
                     aPwgCategoryListWPF = new PwgCategoryListWPF();
                 }
+
                 foreach (PwgCategory pwgCat in aPwgCategoryList)
                 {
@@ -40,4 +41,50 @@
             }
         }
+
+        public static void ConvertPwgCategoryListToPwgRootCategoryWPF(List<PwgCategory> aPwgCategoryList, ref PwgRootCategoryWPF aPwgRootCategory)
+        {
+            if (aPwgCategoryList != null)
+            {
+                if ((aPwgRootCategory == null)
+                    || (aPwgRootCategory.Childrens == null))
+                {
+                    throw new SystemException("The PwgCategoryListWPFHelper.InitRootCategory must be called before calling this.");
+                }
+
+                if (aPwgRootCategory.Childrens == null)
+                {
+                    aPwgRootCategory.Childrens = new PwgCategoryListWPF();
+                }
+
+                PwgCategoryListWPF aPwgCategoryListWPF = aPwgRootCategory.Childrens;
+                foreach (PwgCategory pwgCat in aPwgCategoryList)
+                {
+                    AddPwgCategoryToList(pwgCat, ref aPwgCategoryListWPF);
+                }
+            }
+        }
+
+        public static void InitRootCategory ()
+          {
+            if (PwgModelManager.Instance.CategoryList == null)
+            {
+                throw new SystemException("The PwgModelManager.Instance.CategoryList must be initialized from presentation tread before calling this.");
+            }
+            if (PwgModelManager.Instance.CategoryList.Count != 1)
+            {
+                PwgModelManager.Instance.CategoryList.Clear();
+                PwgRootCategoryWPF aRootCategory = new PwgRootCategoryWPF();
+                aRootCategory.Name = "Root";
+                aRootCategory.Childrens = new PwgCategoryListWPF();
+                PwgModelManager.Instance.CategoryList.Add(aRootCategory);
+                PwgModelManager.Instance.RootCategoryList = aRootCategory;
+            }
+
+            if (PwgModelManager.Instance.RootCategoryList == null)
+            {
+                PwgModelManager.Instance.RootCategoryList = PwgModelManager.Instance.CategoryList.ElementAtOrDefault(0);
+            }
+
+          }
     }
 }
Index: extensions/PiwigoLib/PiwigoWpf/DTO/PwgCategoryListWPF.cs
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/DTO/PwgCategoryListWPF.cs	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/DTO/PwgCategoryListWPF.cs	(revision 11935)
@@ -4,9 +4,13 @@
 using System.Text;
 using System.Collections.ObjectModel;
+using System.ComponentModel;
 
 namespace Com.Piwigo.Wpf.DTO
 {
     public class PwgCategoryListWPF : AsyncObservableCollection<PwgCategoryWPF> 
-    {
-    }
+    {}
+
+    public class PwgRootCategoryListWPF : AsyncObservableCollection<PwgRootCategoryWPF>
+    { }
+
 }
Index: extensions/PiwigoLib/PiwigoWpf/DTO/PwgCategoryWPF.cs
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/DTO/PwgCategoryWPF.cs	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/DTO/PwgCategoryWPF.cs	(revision 11935)
@@ -9,19 +9,10 @@
 namespace Com.Piwigo.Wpf.DTO
 {
-
-    public class PwgCategoryWPF : INotifyPropertyChanged
+    public abstract class PwgTreeCategoryWPF : INotifyPropertyChanged
     {
-        private Int32 _id;
-        public Int32 Id
+        public abstract Int32 Id
         {
-            set { _id = value; OnPropertyChanged("Id"); }
-            get { return _id; }
-        }
-
-        private ObservableCollection<Int32> _upperCategoriesId;
-        public  ObservableCollection<Int32> UpperCategoriesId
-        {
-            set { _upperCategoriesId = value; OnPropertyChanged("UpperCategoriesId"); }
-            get { return _upperCategoriesId; }
+            get;
+            set;
         }
 
@@ -33,48 +24,10 @@
         }
 
-        private Uri _url;
-        public Uri Url
-        {
-            set { _url = value; OnPropertyChanged("Url"); }
-            get { return _url; }
-        }
-
-        private Int64 _imagesCount;
-        public Int64 ImagesCount
-        {
-            set { _imagesCount = value; OnPropertyChanged("ImagesCount"); }
-            get { return _imagesCount; }
-        }
-
-        private Int64 _deepImagesCount;
-        public Int64 DeepImagesCount
-        {
-            set { _deepImagesCount = value; OnPropertyChanged("DeepImagesCount"); }
-            get { return _deepImagesCount; }
-        }
-
-        private Int64 _subCategoriesCount;
-        public Int64 SubCategoriesCount
-        {
-            set { _subCategoriesCount = value; OnPropertyChanged("SubCategoriesCount"); }
-            get { return _subCategoriesCount; }
-        }
-
-        private DateTime _lastDate;
-        public  DateTime LastDate
-        {
-            set { _lastDate = value; OnPropertyChanged("LastDate"); }
-            get { return _lastDate; }
-        }
-
-
         public event PropertyChangedEventHandler PropertyChanged;
-        private void OnPropertyChanged(String info)
+        protected void OnPropertyChanged(String info)
         {
             if (PropertyChanged != null)
                 PropertyChanged(this, new PropertyChangedEventArgs(info));
         }
-
-        #region Presentation Members
 
         #region IsExpanded
@@ -126,14 +79,101 @@
         #endregion // IsSelected
 
-        #region Parent
+        #region Parents - Childs
         private PwgCategoryWPF _parent = null;
-        public PwgCategoryWPF Parent
+        public abstract PwgCategoryWPF Parent
         {
-            get { return _parent; }
+            get;
+            set;
+        }
+
+        private PwgCategoryListWPF _childrens = null;
+        public PwgCategoryListWPF Childrens
+        {
+            get { return _childrens; }
+            set { _childrens = value; this.OnPropertyChanged("Childrens"); }
         }
 
         #endregion // Parent
+    }
 
-        #endregion // Presentation Members        
+    public class PwgRootCategoryWPF : PwgTreeCategoryWPF
+    {
+        private Int32 _id = Com.Piwigo.Lib.DTO.PwgCategory.RootCategoryId;
+        public override Int32 Id
+        {
+            set { throw new SystemException("Couldn't not set the Id for Root category"); }
+            get { return _id; }
+        }
+ 
+        private PwgCategoryWPF _parent = null;
+        public override PwgCategoryWPF Parent
+        {
+            get { return _parent; }
+            set { throw new SystemException("Couldn't not set Parent for Root category"); }
+        }
+    }
+
+    public class PwgCategoryWPF : PwgTreeCategoryWPF
+    {
+        private Int32 _id;
+        public override Int32 Id
+        {
+            set { _id = value; OnPropertyChanged("Id"); }
+            get { return _id; }
+        }
+
+        private ObservableCollection<Int32> _upperCategoriesId;
+        public  ObservableCollection<Int32> UpperCategoriesId
+        {
+            set { _upperCategoriesId = value; OnPropertyChanged("UpperCategoriesId"); }
+            get { return _upperCategoriesId; }
+        }
+
+        private Uri _url;
+        public Uri Url
+        {
+            set { _url = value; OnPropertyChanged("Url"); }
+            get { return _url; }
+        }
+
+        private Int64 _imagesCount;
+        public Int64 ImagesCount
+        {
+            set { _imagesCount = value; OnPropertyChanged("ImagesCount"); }
+            get { return _imagesCount; }
+        }
+
+        private Int64 _deepImagesCount;
+        public Int64 DeepImagesCount
+        {
+            set { _deepImagesCount = value; OnPropertyChanged("DeepImagesCount"); }
+            get { return _deepImagesCount; }
+        }
+
+        private Int64 _subCategoriesCount;
+        public Int64 SubCategoriesCount
+        {
+            set { _subCategoriesCount = value; OnPropertyChanged("SubCategoriesCount"); }
+            get { return _subCategoriesCount; }
+        }
+
+        private DateTime _lastDate;
+        public  DateTime LastDate
+        {
+            set { _lastDate = value; OnPropertyChanged("LastDate"); }
+            get { return _lastDate; }
+        }
+
+        #region Presentation Members
+
+        #region Parents - Childs
+        private PwgCategoryWPF _parent = null;
+        public override PwgCategoryWPF Parent
+        {
+            set { _parent = value; OnPropertyChanged("Parent"); }
+            get { return _parent; }
+        }
+        #endregion // Parents - Childs
+        #endregion // Presentation Members
     }
 }
Index: extensions/PiwigoLib/PiwigoWpf/DTO/PwgModelManager.cs
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/DTO/PwgModelManager.cs	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/DTO/PwgModelManager.cs	(revision 11935)
@@ -9,4 +9,16 @@
     public sealed class PwgModelManager
     {
+        private static System.Threading.SynchronizationContext _synchronizationContext = System.Threading.SynchronizationContext.Current;
+
+        public static System.Threading.SynchronizationContext WPF_SynchronizationContext
+        {
+            get {
+                return _synchronizationContext;
+            }
+            set {
+                _synchronizationContext = value;
+            }
+        }
+
         static readonly PwgModelManagerBase _instance = new PwgModelManagerBase();
 
@@ -55,10 +67,18 @@
             }
 
-            private PwgCategoryListWPF _categoryList;
-            public PwgCategoryListWPF CategoryList
+            private PwgRootCategoryListWPF _categoryList = new PwgRootCategoryListWPF();
+            public PwgRootCategoryListWPF CategoryList
             {
                 set { _categoryList = value; OnPropertyChanged("CategoryList"); }
                 get { return _categoryList; }
             }
+
+            private PwgRootCategoryWPF _rootCategoryList;
+            public PwgRootCategoryWPF RootCategoryList
+            {
+                set { _rootCategoryList = value; OnPropertyChanged("RootCategoryList"); }
+                get { return _rootCategoryList; }
+            }
+
 
             private PwgImageWPF _imageShown;
Index: extensions/PiwigoLib/PiwigoWpf/Helper/AppHelper.cs
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/Helper/AppHelper.cs	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/Helper/AppHelper.cs	(revision 11935)
@@ -55,7 +55,10 @@
         {
             AsyncCommand cmd = PwgCmdProvider.GetByType<T>();
-            if (cmd.CanExecute(parameter))
+            if (cmd != null)
             {
-                cmd.Execute(parameter);
+                if (cmd.CanExecute(parameter))
+                {
+                    cmd.Execute(parameter);
+                }
             }
         }
Index: extensions/PiwigoLib/PiwigoWpf/MainWindow.xaml
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/MainWindow.xaml	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/MainWindow.xaml	(revision 11935)
@@ -9,19 +9,85 @@
         xmlns:pwghlp="clr-namespace:Com.Piwigo.Wpf.Helper"
         Title="PiwigoWpf"
+        Name="_this"
         WindowState="Maximized"
-        MinHeight="600" MinWidth="800">
+        MinHeight="600" MinWidth="800" Background="AliceBlue">
     <Window.Resources>
         <pwghlp:AdvBooltoVisibilityConverter x:Key="AdvBooltoVisibilityConverter"  Collapse="False" Reverse="False" />
         <pwghlp:AdvBooltoVisibilityConverter x:Key="AdvBooltoVisibilityConverterReversal"  Collapse="False" Reverse="True" />
+        <Style TargetType="GridSplitter">
+            <Setter Property="Background"  Value="CadetBlue"/>
+            <Setter Property="Margin"  Value="0"/>
+            <Setter Property="HorizontalAlignment"  Value="Stretch"/>
+            <Setter Property="VerticalAlignment"  Value="Stretch"/>
+            <Setter Property="ShowsPreview"  Value="True" />
+            <Setter Property="ResizeBehavior"  Value="PreviousAndNext"/>
+        </Style>
+        <ControlTemplate x:Key="loadingAnimation">
+            <ControlTemplate.Triggers>
+                <Trigger Property="Visibility" Value="Visible">
+                    <Trigger.EnterActions>
+                        <BeginStoryboard Name="animation">
+                            <Storyboard Storyboard.DesiredFrameRate="25">
+                                <DoubleAnimation From="0" To="359" Duration="0:0:5" RepeatBehavior="Forever"
+                                                 Storyboard.TargetName="angle" Storyboard.TargetProperty="Angle"/>
+                            </Storyboard>
+                        </BeginStoryboard>
+                    </Trigger.EnterActions>
+                    <Trigger.ExitActions>
+                        <StopStoryboard BeginStoryboardName="animation"/>
+                    </Trigger.ExitActions>
+                </Trigger>
+            </ControlTemplate.Triggers>
+            <Image Name="content" Opacity="0.4">
+                <Image.Source>
+                    <DrawingImage>
+                        <DrawingImage.Drawing>
+                            <DrawingGroup>
+                                <GeometryDrawing Brush="Transparent">
+                                    <GeometryDrawing.Geometry>
+                                        <RectangleGeometry Rect="0,0,1,1"/>
+                                    </GeometryDrawing.Geometry>
+                                </GeometryDrawing>
+                                <DrawingGroup>
+                                    <DrawingGroup.Transform>
+                                        <RotateTransform x:Name="angle" Angle="0" CenterX="0.5" CenterY="0.5"/>
+                                    </DrawingGroup.Transform>
+                                    <GeometryDrawing>
+                                        <GeometryDrawing.Pen>
+                                            <Pen Brush="Aquamarine" Thickness="0.08"/>
+                                        </GeometryDrawing.Pen>
+                                        <GeometryDrawing.Geometry>
+                                            <PathGeometry>
+                                                <PathFigure StartPoint="0.9,0.5">
+                                                    <ArcSegment Point="0.5,0.1" RotationAngle="90" SweepDirection="Clockwise" IsLargeArc="True" Size="0.4,0.4"/>
+                                                </PathFigure>
+                                            </PathGeometry>
+                                        </GeometryDrawing.Geometry>
+                                    </GeometryDrawing>
+                                    <GeometryDrawing Brush="Aquamarine">
+                                        <GeometryDrawing.Geometry>
+                                            <PathGeometry>
+                                                <PathFigure StartPoint="0.5,0">
+                                                    <LineSegment Point="0.7,0.1" />
+                                                    <LineSegment Point="0.5,0.2" />
+                                                </PathFigure>
+                                            </PathGeometry>
+                                        </GeometryDrawing.Geometry>
+                                    </GeometryDrawing>
+                                </DrawingGroup>
+                            </DrawingGroup>
+                        </DrawingImage.Drawing>
+                    </DrawingImage>
+                </Image.Source>
+            </Image>
+        </ControlTemplate>
     </Window.Resources>
     <Grid>
         <Grid.ColumnDefinitions >
-            <ColumnDefinition Width="*"/>
+            <ColumnDefinition Width="Auto"/>
             <ColumnDefinition Width="Auto"/>
             <ColumnDefinition Width="*" MinWidth="600"/>
         </Grid.ColumnDefinitions>
         <Grid.RowDefinitions>
-            <RowDefinition Height="Auto" />
-            <RowDefinition Height="*" />
             <RowDefinition Height="Auto" />
             <RowDefinition Height="*" />
@@ -37,8 +103,12 @@
                    Source="pack://application:,,,/Pictures/PiwigoLogo.png" 
                    ToolTip="www.piwigo.org" Stretch="None" HorizontalAlignment="Left" />
-                <Image Name="ImgGlobe" Margin="2" 
-                   Visibility="{Binding Source={x:Static pwgdto:PwgModelManager.Instance}, Path=booCmdRunning, Converter={StaticResource AdvBooltoVisibilityConverter}}"
+                <Grid Name="OverLay" Visibility="{Binding Source={x:Static pwgdto:PwgModelManager.Instance}, Path=booCmdRunning, Converter={StaticResource AdvBooltoVisibilityConverter}}">
+                <Image Name="ImgGlobe" Margin="2"                    
                    Source="pack://application:,,,/Pictures/128x128/Globe.png" 
-                   ToolTip="www.piwigo.org" Stretch="None" HorizontalAlignment="Right"/>
+                   ToolTip="www.piwigo.org" Stretch="None" HorizontalAlignment="Right">
+                </Image>
+                <Control Name="loading" Grid.Column="4" Template="{StaticResource loadingAnimation}"
+                 Width="116" VerticalAlignment="Center" HorizontalAlignment="Center" />
+                </Grid>
                 <UniformGrid  Name="SessInfo" Margin="10" DataContext="{Binding Source={x:Static pwgdto:PwgModelManager.Instance}, Path=Session}" Columns="2" Rows="5">
                     <Label Content="Status"/>
@@ -68,11 +138,11 @@
             </StackPanel>
         </StackPanel>
-        <TreeView Name="listViewCategory"  
+        <TreeView Name="listViewCategory"  Background="{Binding ElementName=this}"
                 Grid.Column="0"
                 Grid.Row="1"  
-                Grid.RowSpan="3"
-                MinWidth="100" 
+                MinWidth="180" 
                 DataContext="{Binding Source={StaticResource Categories}}" 
-                ItemsSource="{Binding }" MouseDoubleClick="listViewCategory_MouseDoubleClick">
+                ItemsSource="{Binding}"  MouseDoubleClick="listViewCategory_MouseDoubleClick"
+                HorizontalAlignment="Left" PreviewMouseDown="listViewCategory_PreviewMouseDown">
             <TreeView.ItemContainerStyle>
                 <!-- 
@@ -116,6 +186,18 @@
             <TreeView.Resources>
                 <HierarchicalDataTemplate 
+                DataType="{x:Type pwgdto:PwgTreeCategoryWPF}" 
+                ItemsSource="{Binding Childrens}"
+                >
+                    <StackPanel Orientation="Horizontal" DataContext="{Binding}" 
+                        VerticalAlignment="Center" HorizontalAlignment="Center">
+                        <Image Source="pack://application:,,,/Pictures/22x22/folder_html.png" Margin="5"
+                        Stretch="None">
+                        </Image>
+                        <TextBlock Text="{Binding Name}" />
+                    </StackPanel>
+                </HierarchicalDataTemplate>
+                <HierarchicalDataTemplate 
                 DataType="{x:Type pwgdto:PwgCategoryWPF}" 
-                ItemsSource="{Binding Children}"
+                ItemsSource="{Binding Childrens}"
                 >
                     <StackPanel Orientation="Horizontal" DataContext="{Binding}" 
@@ -123,107 +205,117 @@
                         <Image Source="pack://application:,,,/Pictures/22x22/folder_images.png" Margin="5"
                         Stretch="None">
-                            <Image.ToolTip>
-                                <StackPanel Orientation="Vertical">
-                                    <StackPanel Orientation="Horizontal">
-                                        <TextBlock Text="{Binding Path=ImagesCount}"/>
-                                        <TextBlock Text=" images inside"/>
-                                    </StackPanel>
-                                    <StackPanel Orientation="Horizontal">
-                                        <TextBlock Text="{Binding Path=SubCategoriesCount}"/>
-                                        <TextBlock Text=" categories inside"/>
-                                    </StackPanel>
-                                </StackPanel>
-                            </Image.ToolTip>
                         </Image>
                         <TextBlock Text="{Binding Name}" />
+                        <StackPanel.ToolTip>
+                            <UniformGrid>
+                                    <TextBlock Text="{Binding Path=ImagesCount}"/>
+                                    <TextBlock Text=" images inside"/>
+                                    <TextBlock Text="{Binding Path=SubCategoriesCount}"/>
+                                    <TextBlock Text=" categories inside"/>
+                            </UniformGrid>
+                        </StackPanel.ToolTip>
                     </StackPanel>
                 </HierarchicalDataTemplate>
             </TreeView.Resources>
         </TreeView>
-        <GridSplitter   ResizeDirection="Columns"
+        <GridSplitter ResizeDirection="Columns"
                     Grid.Column="1"
                     Grid.Row="1"  
-                    Grid.RowSpan="3"
-                    Width="10" Background="Azure" ShowsPreview="True" ResizeBehavior="PreviousAndNext"></GridSplitter>
-        <ListView Name="listViewImage"   
-            Grid.Column="3"
-            Grid.Row="1"   
+                    Width="5" Height="Auto"></GridSplitter>
+        <Grid Name="CatgeoryContent" 
+                    Grid.Column="2"
+                    Grid.Row="1"  >
+            <Grid.ColumnDefinitions >
+                <ColumnDefinition Width="*"/>
+            </Grid.ColumnDefinitions>
+            <Grid.RowDefinitions>
+                <RowDefinition Height="*" />
+                <RowDefinition Height="Auto"/>
+                <RowDefinition Height="*" />
+            </Grid.RowDefinitions>
+            <ListView Name="listViewImage" Background="{Binding ElementName=this}"
+            Grid.Column="0"
+            Grid.Row="0"   
             MinWidth="500"
             DataContext="{Binding Source={StaticResource Images}}" 
             ItemsSource="{Binding }" SelectionMode="Single" IsSynchronizedWithCurrentItem="True" SelectionChanged="listViewImage_SelectionChanged">
-            <ListView.ItemsPanel>
-                <ItemsPanelTemplate>
-                    <UniformGrid/>
-                </ItemsPanelTemplate>
-            </ListView.ItemsPanel>
-            <ListView.ItemContainerStyle>
-                <Style TargetType="{x:Type ListViewItem}">
-                    <Setter Property="FontWeight" Value="Normal" />
-                    <Setter Property="MaxHeight" Value="75" />
-                    <Setter Property="MinHeight" Value="75" />
-                    <Setter Property="Opacity" Value=".75" />
-                    <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
-                    <Style.Triggers>
-                        <EventTrigger RoutedEvent="Mouse.MouseEnter">
-                            <EventTrigger.Actions>
-                                <BeginStoryboard>
-                                    <Storyboard>
-                                        <DoubleAnimation 
+                <ListView.ItemsPanel>
+                    <ItemsPanelTemplate>
+                        <UniformGrid/>
+                    </ItemsPanelTemplate>
+                </ListView.ItemsPanel>
+                <ListView.ItemContainerStyle>
+                    <Style TargetType="{x:Type ListViewItem}">
+                        <Setter Property="FontWeight" Value="Normal" />
+                        <Setter Property="MaxHeight" Value="75" />
+                        <Setter Property="MinHeight" Value="75" />
+                        <Setter Property="Opacity" Value=".75" />
+                        <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
+                        <Style.Triggers>
+                            <EventTrigger RoutedEvent="Mouse.MouseEnter">
+                                <EventTrigger.Actions>
+                                    <BeginStoryboard>
+                                        <Storyboard>
+                                            <DoubleAnimation 
 									Duration="0:0:0.2" 
 									Storyboard.TargetProperty="Opacity"
 									To="1.0" />
-                                    </Storyboard>
-                                </BeginStoryboard>
-                            </EventTrigger.Actions>
-                        </EventTrigger>
-                        <EventTrigger RoutedEvent="Mouse.MouseLeave">
-                            <EventTrigger.Actions>
-                                <BeginStoryboard>
-                                    <Storyboard>
-                                        <DoubleAnimation
+                                        </Storyboard>
+                                    </BeginStoryboard>
+                                </EventTrigger.Actions>
+                            </EventTrigger>
+                            <EventTrigger RoutedEvent="Mouse.MouseLeave">
+                                <EventTrigger.Actions>
+                                    <BeginStoryboard>
+                                        <Storyboard>
+                                            <DoubleAnimation
 									Duration="0:0:0.2" 
 									Storyboard.TargetProperty="Opacity" />
-                                    </Storyboard>
-                                </BeginStoryboard>
-                            </EventTrigger.Actions>
-                        </EventTrigger>
-                        <Trigger Property="IsSelected" Value="True">
-                            <Setter Property="FontWeight" Value="Bold" />
-                        </Trigger>
-                    </Style.Triggers>
-                </Style>
-            </ListView.ItemContainerStyle>
-            <ListView.Resources>
-                <DataTemplate DataType="{x:Type pwgdto:PwgImageWPF}">
-                    <Border VerticalAlignment="Center" HorizontalAlignment="Center" Padding="4" Margin="2" Background="Blue"
+                                        </Storyboard>
+                                    </BeginStoryboard>
+                                </EventTrigger.Actions>
+                            </EventTrigger>
+                            <Trigger Property="IsSelected" Value="True">
+                                <Setter Property="FontWeight" Value="Bold" />
+                            </Trigger>
+                        </Style.Triggers>
+                    </Style>
+                </ListView.ItemContainerStyle>
+                <ListView.Resources>
+                    <DataTemplate DataType="{x:Type pwgdto:PwgImageWPF}">
+                        <Border VerticalAlignment="Center" HorizontalAlignment="Center" Padding="4" Margin="2" Background="Blue"
                     DataContext="{Binding}">
-                        <!--Source="{Binding UrlElement}"-->
-                        <Image ToolTip="{Binding File}" >
-                            <Image.Source>
-                                <Binding Path="ImgSourceThumb" />
-                                <!--Converter="{x:Static pwgsrv:ImageCacheManager.ImageUrlCachedConverter}"-->
-                            </Image.Source>
-                        </Image>
-                    </Border>
-                </DataTemplate>
-            </ListView.Resources>
-        </ListView>
-        <GridSplitter   ResizeDirection="Rows"
-                    Grid.Column="3"
-                    Grid.Row="2"  
-                    Height="3" Background="Azure" ShowsPreview="True" ResizeBehavior="PreviousAndNext"></GridSplitter>
-        <StackPanel Grid.Column="3"
-                    Grid.Row="3" 
-                    MinHeight="150" MinWidth="200"  DataContext="{Binding Source={x:Static pwgdto:PwgModelManager.Instance}, Path=ImageShown}">
-            <Image ToolTip="{Binding Path=File}" >
-                <Image.Source>
-                    <Binding Path="ImgSource" />
-                </Image.Source>
-            </Image>
-        </StackPanel>
+                            <!--Source="{Binding UrlElement}"-->
+                            <Image ToolTip="{Binding File}" >
+                                <Image.Source>
+                                    <Binding Path="ImgSourceThumb" />
+                                    <!--Converter="{x:Static pwgsrv:ImageCacheManager.ImageUrlCachedConverter}"-->
+                                </Image.Source>
+                            </Image>
+                        </Border>
+                    </DataTemplate>
+                </ListView.Resources>
+            </ListView>
+            <GridSplitter ResizeDirection="Rows"
+                    Grid.Column="0"
+                    Grid.Row="1"  
+                    Width="Auto"
+                    Height="5"
+            ></GridSplitter>
+            <DockPanel Grid.Column="0"
+                    Grid.Row="2" 
+                    DataContext="{Binding Source={x:Static pwgdto:PwgModelManager.Instance}, Path=ImageShown}"
+                    >
+                <Image ToolTip="{Binding Path=File}" MaxHeight="360" MaxWidth="480" MinHeight="120" MinWidth="160">
+                    <Image.Source>
+                        <Binding Path="ImgSource" />
+                    </Image.Source>
+                </Image>
+            </DockPanel>
+        </Grid>
         <Expander  
             Grid.Column="0"
             Grid.ColumnSpan="3"
-            Grid.Row="4"  >
+            Grid.Row="3"  >
             <Expander.Header>
                 <Button Height="18" Name="btnDeleteLog" Width="18" 
Index: extensions/PiwigoLib/PiwigoWpf/MainWindow.xaml.cs
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/MainWindow.xaml.cs	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/MainWindow.xaml.cs	(revision 11935)
@@ -14,4 +14,5 @@
 using Com.Piwigo.Wpf.Helper;
 using Com.Piwigo.Wpf.Command;
+using Com.Piwigo.Wpf.DTO;
 
 namespace Com.Piwigo.Wpf
@@ -42,4 +43,30 @@
         }
 
+        private void listViewCategory_PreviewMouseDown(object sender, MouseButtonEventArgs e)
+        {
+            e.Handled = false;
+            DependencyObject dep = (DependencyObject)e.OriginalSource;
+            while ((dep != null) && !(dep is TreeViewItem))
+            {
+                dep = VisualTreeHelper.GetParent(dep);
+            }
+            if (dep != null)
+            {
+                if (((TreeViewItem)dep).DataContext is PwgCategoryWPF)
+                {
+                    PwgCategoryWPF aCat = (PwgCategoryWPF)((TreeViewItem)dep).DataContext;
+
+                    if ((e.ChangedButton == MouseButton.Left) && (e.ClickCount == 1))
+                    {
+                        // left single click event
+                        if (aCat.Childrens == null)
+                        {
+                            AppHelper.ExecuteCommand<PwgCmdGetSubCategorieforCategory>(aCat);
+                        }
+                    }
+                }
+            }
+        }
+
 
     }
Index: extensions/PiwigoLib/PiwigoWpf/PiwigoWpf.csproj
===================================================================
--- extensions/PiwigoLib/PiwigoWpf/PiwigoWpf.csproj	(revision 11926)
+++ extensions/PiwigoLib/PiwigoWpf/PiwigoWpf.csproj	(revision 11935)
@@ -77,4 +77,5 @@
       <SubType>Designer</SubType>
     </ApplicationDefinition>
+    <Compile Include="Command\PwgCmdGetSubCategorieforCategory.cs" />
     <Compile Include="Command\PwgCmdSelectImageInCategory.cs" />
     <Compile Include="Command\DelegateCommand.cs" />
